mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-d2a486c2b7960256/out/
matrixpilot.rs

1#![doc = "MAVLink matrixpilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1001impl HighresImuUpdatedFlags {
1002    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1003}
1004impl Default for HighresImuUpdatedFlags {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1010impl HilActuatorControlsFlags {
1011    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1012}
1013impl Default for HilActuatorControlsFlags {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1019impl HilSensorUpdatedFlags {
1020    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1021}
1022impl Default for HilSensorUpdatedFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1028impl HlFailureFlag {
1029    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1030}
1031impl Default for HlFailureFlag {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1037impl IlluminatorErrorFlags {
1038    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1039}
1040impl Default for IlluminatorErrorFlags {
1041    fn default() -> Self {
1042        Self::DEFAULT
1043    }
1044}
1045#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1047#[cfg_attr(feature = "serde", serde(tag = "type"))]
1048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1049#[repr(u32)]
1050#[doc = "Modes of illuminator"]
1051pub enum IlluminatorMode {
1052    #[doc = "Illuminator mode is not specified/unknown"]
1053    ILLUMINATOR_MODE_UNKNOWN = 0,
1054    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1055    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1056    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1057    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1058}
1059impl IlluminatorMode {
1060    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1061}
1062impl Default for IlluminatorMode {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1069#[cfg_attr(feature = "serde", serde(tag = "type"))]
1070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1071#[repr(u32)]
1072#[doc = "Type of landing target"]
1073pub enum LandingTargetType {
1074    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1075    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1076    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1077    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1078    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1079    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1080    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1081    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1082}
1083impl LandingTargetType {
1084    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1085}
1086impl Default for LandingTargetType {
1087    fn default() -> Self {
1088        Self::DEFAULT
1089    }
1090}
1091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1093#[cfg_attr(feature = "serde", serde(tag = "type"))]
1094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1095#[repr(u32)]
1096pub enum MagCalStatus {
1097    MAG_CAL_NOT_STARTED = 0,
1098    MAG_CAL_WAITING_TO_START = 1,
1099    MAG_CAL_RUNNING_STEP_ONE = 2,
1100    MAG_CAL_RUNNING_STEP_TWO = 3,
1101    MAG_CAL_SUCCESS = 4,
1102    MAG_CAL_FAILED = 5,
1103    MAG_CAL_BAD_ORIENTATION = 6,
1104    MAG_CAL_BAD_RADIUS = 7,
1105}
1106impl MagCalStatus {
1107    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1108}
1109impl Default for MagCalStatus {
1110    fn default() -> Self {
1111        Self::DEFAULT
1112    }
1113}
1114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1116#[cfg_attr(feature = "serde", serde(tag = "type"))]
1117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1118#[repr(u32)]
1119pub enum MavArmAuthDeniedReason {
1120    #[doc = "Not a specific reason"]
1121    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1122    #[doc = "Authorizer will send the error as string to GCS"]
1123    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1124    #[doc = "At least one waypoint have a invalid value"]
1125    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1126    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1127    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1128    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1129    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1130    #[doc = "Weather is not good to fly"]
1131    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1132}
1133impl MavArmAuthDeniedReason {
1134    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1135}
1136impl Default for MavArmAuthDeniedReason {
1137    fn default() -> Self {
1138        Self::DEFAULT
1139    }
1140}
1141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1143#[cfg_attr(feature = "serde", serde(tag = "type"))]
1144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1145#[repr(u32)]
1146#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1147pub enum MavAutopilot {
1148    #[doc = "Generic autopilot, full support for everything"]
1149    MAV_AUTOPILOT_GENERIC = 0,
1150    #[doc = "Reserved for future use."]
1151    MAV_AUTOPILOT_RESERVED = 1,
1152    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1153    MAV_AUTOPILOT_SLUGS = 2,
1154    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1155    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1156    #[doc = "OpenPilot, <http://openpilot.org>"]
1157    MAV_AUTOPILOT_OPENPILOT = 4,
1158    #[doc = "Generic autopilot only supporting simple waypoints"]
1159    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1160    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1161    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1162    #[doc = "Generic autopilot supporting the full mission command set"]
1163    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1164    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1165    MAV_AUTOPILOT_INVALID = 8,
1166    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1167    MAV_AUTOPILOT_PPZ = 9,
1168    #[doc = "UAV Dev Board"]
1169    MAV_AUTOPILOT_UDB = 10,
1170    #[doc = "FlexiPilot"]
1171    MAV_AUTOPILOT_FP = 11,
1172    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1173    MAV_AUTOPILOT_PX4 = 12,
1174    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1175    MAV_AUTOPILOT_SMACCMPILOT = 13,
1176    #[doc = "AutoQuad -- <http://autoquad.org>"]
1177    MAV_AUTOPILOT_AUTOQUAD = 14,
1178    #[doc = "Armazila -- <http://armazila.com>"]
1179    MAV_AUTOPILOT_ARMAZILA = 15,
1180    #[doc = "Aerob -- <http://aerob.ru>"]
1181    MAV_AUTOPILOT_AEROB = 16,
1182    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1183    MAV_AUTOPILOT_ASLUAV = 17,
1184    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1185    MAV_AUTOPILOT_SMARTAP = 18,
1186    #[doc = "AirRails - <http://uaventure.com>"]
1187    MAV_AUTOPILOT_AIRRAILS = 19,
1188    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1189    MAV_AUTOPILOT_REFLEX = 20,
1190}
1191impl MavAutopilot {
1192    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1193}
1194impl Default for MavAutopilot {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1201#[cfg_attr(feature = "serde", serde(tag = "type"))]
1202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1203#[repr(u32)]
1204#[doc = "Enumeration for battery charge states."]
1205pub enum MavBatteryChargeState {
1206    #[doc = "Low battery state is not provided"]
1207    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1208    #[doc = "Battery is not in low state. Normal operation."]
1209    MAV_BATTERY_CHARGE_STATE_OK = 1,
1210    #[doc = "Battery state is low, warn and monitor close."]
1211    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1212    #[doc = "Battery state is critical, return or abort immediately."]
1213    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1214    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1215    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1216    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1217    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1218    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1219    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1220    #[doc = "Battery is charging."]
1221    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1222}
1223impl MavBatteryChargeState {
1224    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1225}
1226impl Default for MavBatteryChargeState {
1227    fn default() -> Self {
1228        Self::DEFAULT
1229    }
1230}
1231bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1232impl MavBatteryFault {
1233    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1234}
1235impl Default for MavBatteryFault {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Enumeration of battery functions"]
1246pub enum MavBatteryFunction {
1247    #[doc = "Battery function is unknown"]
1248    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1249    #[doc = "Battery supports all flight systems"]
1250    MAV_BATTERY_FUNCTION_ALL = 1,
1251    #[doc = "Battery for the propulsion system"]
1252    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1253    #[doc = "Avionics battery"]
1254    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1255    #[doc = "Payload battery"]
1256    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1257}
1258impl MavBatteryFunction {
1259    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1260}
1261impl Default for MavBatteryFunction {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1268#[cfg_attr(feature = "serde", serde(tag = "type"))]
1269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1270#[repr(u32)]
1271#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1272pub enum MavBatteryMode {
1273    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1274    MAV_BATTERY_MODE_UNKNOWN = 0,
1275    #[doc = "Battery is auto discharging (towards storage level)."]
1276    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1277    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1278    MAV_BATTERY_MODE_HOT_SWAP = 2,
1279}
1280impl MavBatteryMode {
1281    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1282}
1283impl Default for MavBatteryMode {
1284    fn default() -> Self {
1285        Self::DEFAULT
1286    }
1287}
1288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1290#[cfg_attr(feature = "serde", serde(tag = "type"))]
1291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1292#[repr(u32)]
1293#[doc = "Enumeration of battery types"]
1294pub enum MavBatteryType {
1295    #[doc = "Not specified."]
1296    MAV_BATTERY_TYPE_UNKNOWN = 0,
1297    #[doc = "Lithium polymer battery"]
1298    MAV_BATTERY_TYPE_LIPO = 1,
1299    #[doc = "Lithium-iron-phosphate battery"]
1300    MAV_BATTERY_TYPE_LIFE = 2,
1301    #[doc = "Lithium-ION battery"]
1302    MAV_BATTERY_TYPE_LION = 3,
1303    #[doc = "Nickel metal hydride battery"]
1304    MAV_BATTERY_TYPE_NIMH = 4,
1305}
1306impl MavBatteryType {
1307    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1308}
1309impl Default for MavBatteryType {
1310    fn default() -> Self {
1311        Self::DEFAULT
1312    }
1313}
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1320pub enum MavCmd {
1321    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1322    MAV_CMD_NAV_WAYPOINT = 16,
1323    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1324    MAV_CMD_NAV_LOITER_UNLIM = 17,
1325    #[doc = "Loiter around this waypoint for X turns"]
1326    MAV_CMD_NAV_LOITER_TURNS = 18,
1327    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1328    MAV_CMD_NAV_LOITER_TIME = 19,
1329    #[doc = "Return to launch location"]
1330    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1331    #[doc = "Land at location."]
1332    MAV_CMD_NAV_LAND = 21,
1333    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1334    MAV_CMD_NAV_TAKEOFF = 22,
1335    #[doc = "Land at local position (local frame only)"]
1336    MAV_CMD_NAV_LAND_LOCAL = 23,
1337    #[doc = "Takeoff from local position (local frame only)"]
1338    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1339    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1340    MAV_CMD_NAV_FOLLOW = 25,
1341    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1342    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1343    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1344    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1345    #[doc = "Begin following a target"]
1346    MAV_CMD_DO_FOLLOW = 32,
1347    #[doc = "Reposition the MAV after a follow target command has been sent"]
1348    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1349    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1350    MAV_CMD_DO_ORBIT = 34,
1351    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1352    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1353    MAV_CMD_NAV_ROI = 80,
1354    #[doc = "Control autonomous path planning on the MAV."]
1355    MAV_CMD_NAV_PATHPLANNING = 81,
1356    #[doc = "Navigate to waypoint using a spline path."]
1357    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1358    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1359    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1360    #[doc = "Land using VTOL mode"]
1361    MAV_CMD_NAV_VTOL_LAND = 85,
1362    #[doc = "hand control over to an external controller"]
1363    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1364    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1365    MAV_CMD_NAV_DELAY = 93,
1366    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1367    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1368    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1369    MAV_CMD_NAV_LAST = 95,
1370    #[doc = "Delay mission state machine."]
1371    MAV_CMD_CONDITION_DELAY = 112,
1372    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1373    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1374    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1375    MAV_CMD_CONDITION_DISTANCE = 114,
1376    #[doc = "Reach a certain target angle."]
1377    MAV_CMD_CONDITION_YAW = 115,
1378    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1379    MAV_CMD_CONDITION_LAST = 159,
1380    #[doc = "Set system mode."]
1381    MAV_CMD_DO_SET_MODE = 176,
1382    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1383    MAV_CMD_DO_JUMP = 177,
1384    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1385    MAV_CMD_DO_CHANGE_SPEED = 178,
1386    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1387    MAV_CMD_DO_SET_HOME = 179,
1388    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1389    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1390    MAV_CMD_DO_SET_PARAMETER = 180,
1391    #[doc = "Set a relay to a condition."]
1392    MAV_CMD_DO_SET_RELAY = 181,
1393    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1394    MAV_CMD_DO_REPEAT_RELAY = 182,
1395    #[doc = "Set a servo to a desired PWM value."]
1396    MAV_CMD_DO_SET_SERVO = 183,
1397    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1398    MAV_CMD_DO_REPEAT_SERVO = 184,
1399    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1400    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1401    #[doc = "Change altitude set point."]
1402    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1403    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1404    MAV_CMD_DO_SET_ACTUATOR = 187,
1405    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1406    MAV_CMD_DO_RETURN_PATH_START = 188,
1407    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1408    MAV_CMD_DO_LAND_START = 189,
1409    #[doc = "Mission command to perform a landing from a rally point."]
1410    MAV_CMD_DO_RALLY_LAND = 190,
1411    #[doc = "Mission command to safely abort an autonomous landing."]
1412    MAV_CMD_DO_GO_AROUND = 191,
1413    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1414    MAV_CMD_DO_REPOSITION = 192,
1415    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1416    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1417    #[doc = "Set moving direction to forward or reverse."]
1418    MAV_CMD_DO_SET_REVERSE = 194,
1419    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1420    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1421    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1422    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1423    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1424    MAV_CMD_DO_SET_ROI_NONE = 197,
1425    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1426    MAV_CMD_DO_SET_ROI_SYSID = 198,
1427    #[doc = "Control onboard camera system."]
1428    MAV_CMD_DO_CONTROL_VIDEO = 200,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_DO_SET_ROI = 201,
1432    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1433    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1434    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1435    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1436    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1437    #[doc = "Mission command to configure a camera or antenna mount"]
1438    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1439    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1440    #[doc = "Mission command to control a camera or antenna mount"]
1441    MAV_CMD_DO_MOUNT_CONTROL = 205,
1442    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1443    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1444    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1445    MAV_CMD_DO_FENCE_ENABLE = 207,
1446    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1447    MAV_CMD_DO_PARACHUTE = 208,
1448    #[doc = "Command to perform motor test."]
1449    MAV_CMD_DO_MOTOR_TEST = 209,
1450    #[doc = "Change to/from inverted flight."]
1451    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1452    #[doc = "Mission command to operate a gripper."]
1453    MAV_CMD_DO_GRIPPER = 211,
1454    #[doc = "Enable/disable autotune."]
1455    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1456    #[doc = "Sets a desired vehicle turn angle and speed change."]
1457    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1458    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1459    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1460    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1461    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1462    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1463    #[doc = "set id of master controller"]
1464    MAV_CMD_DO_GUIDED_MASTER = 221,
1465    #[doc = "Set limits for external control"]
1466    MAV_CMD_DO_GUIDED_LIMITS = 222,
1467    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1468    MAV_CMD_DO_ENGINE_CONTROL = 223,
1469    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1470    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1471    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1472    MAV_CMD_DO_LAST = 240,
1473    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1474    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1475    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1476    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1477    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1478    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1479    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1480    MAV_CMD_PREFLIGHT_STORAGE = 245,
1481    #[doc = "Request the reboot or shutdown of system components."]
1482    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1483    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1484    MAV_CMD_OVERRIDE_GOTO = 252,
1485    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1486    MAV_CMD_OBLIQUE_SURVEY = 260,
1487    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1488    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1489    #[doc = "start running a mission"]
1490    MAV_CMD_MISSION_START = 300,
1491    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1492    MAV_CMD_ACTUATOR_TEST = 310,
1493    #[doc = "Actuator configuration command."]
1494    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1495    #[doc = "Arms / Disarms a component"]
1496    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1497    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1498    MAV_CMD_RUN_PREARM_CHECKS = 401,
1499    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1500    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1501    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1502    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1503    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1504    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1505    MAV_CMD_GET_HOME_POSITION = 410,
1506    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1507    MAV_CMD_INJECT_FAILURE = 420,
1508    #[doc = "Starts receiver pairing."]
1509    MAV_CMD_START_RX_PAIR = 500,
1510    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1511    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1512    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1513    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1514    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1515    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1516    MAV_CMD_REQUEST_MESSAGE = 512,
1517    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1518    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1519    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1520    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1521    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1522    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1523    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1524    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1525    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1526    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1527    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1528    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1529    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1530    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1531    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1532    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1533    MAV_CMD_STORAGE_FORMAT = 526,
1534    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1535    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1536    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1537    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1538    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1539    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1540    #[doc = "Reset all camera settings to Factory Default"]
1541    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1542    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1543    MAV_CMD_SET_CAMERA_MODE = 530,
1544    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1545    MAV_CMD_SET_CAMERA_ZOOM = 531,
1546    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1547    MAV_CMD_SET_CAMERA_FOCUS = 532,
1548    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1549    MAV_CMD_SET_STORAGE_USAGE = 533,
1550    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1551    MAV_CMD_SET_CAMERA_SOURCE = 534,
1552    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1553    MAV_CMD_JUMP_TAG = 600,
1554    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1555    MAV_CMD_DO_JUMP_TAG = 601,
1556    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1557    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1558    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1559    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1560    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1561    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1562    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1563    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1566    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1567    #[doc = "Enable or disable on-board camera triggering system."]
1568    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1569    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1570    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1571    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1572    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1573    #[doc = "Stops ongoing tracking."]
1574    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1575    #[doc = "Starts video capture (recording)."]
1576    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1577    #[doc = "Stop the current video capture (recording)."]
1578    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1579    #[doc = "Start video streaming"]
1580    MAV_CMD_VIDEO_START_STREAMING = 2502,
1581    #[doc = "Stop the given video stream"]
1582    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1583    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1584    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1585    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1587    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1588    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1589    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1590    MAV_CMD_LOGGING_START = 2510,
1591    #[doc = "Request to stop streaming log data over MAVLink"]
1592    MAV_CMD_LOGGING_STOP = 2511,
1593    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1594    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1595    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1596    #[doc = "Create a panorama at the current position"]
1597    MAV_CMD_PANORAMA_CREATE = 2800,
1598    #[doc = "Request VTOL transition"]
1599    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1600    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1601    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1602    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1603    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1604    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1605    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1606    #[doc = "Delay mission state machine until gate has been reached."]
1607    MAV_CMD_CONDITION_GATE = 4501,
1608    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1609    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1610    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1611    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1612    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1613    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1614    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1615    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1616    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1617    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1618    #[doc = "Rally point. You can have multiple rally points defined."]
1619    MAV_CMD_NAV_RALLY_POINT = 5100,
1620    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1621    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1622    #[doc = "Change state of safety switch."]
1623    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1624    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1625    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1626    #[deprecated = "  (Deprecated since 2021-06)"]
1627    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1628    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1629    #[deprecated = "  (Deprecated since 2021-06)"]
1630    #[doc = "Control the payload deployment."]
1631    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1632    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1633    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1634    #[doc = "Command to operate winch."]
1635    MAV_CMD_DO_WINCH = 42600,
1636    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1637    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1638    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1639    MAV_CMD_WAYPOINT_USER_1 = 31000,
1640    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1641    MAV_CMD_WAYPOINT_USER_2 = 31001,
1642    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1643    MAV_CMD_WAYPOINT_USER_3 = 31002,
1644    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1645    MAV_CMD_WAYPOINT_USER_4 = 31003,
1646    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1647    MAV_CMD_WAYPOINT_USER_5 = 31004,
1648    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1649    MAV_CMD_SPATIAL_USER_1 = 31005,
1650    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1651    MAV_CMD_SPATIAL_USER_2 = 31006,
1652    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1653    MAV_CMD_SPATIAL_USER_3 = 31007,
1654    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1655    MAV_CMD_SPATIAL_USER_4 = 31008,
1656    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1657    MAV_CMD_SPATIAL_USER_5 = 31009,
1658    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1659    MAV_CMD_USER_1 = 31010,
1660    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1661    MAV_CMD_USER_2 = 31011,
1662    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1663    MAV_CMD_USER_3 = 31012,
1664    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1665    MAV_CMD_USER_4 = 31013,
1666    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1667    MAV_CMD_USER_5 = 31014,
1668    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1669    MAV_CMD_CAN_FORWARD = 32000,
1670    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1671    MAV_CMD_PREFLIGHT_STORAGE_ADVANCED = 0,
1672}
1673impl MavCmd {
1674    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1675}
1676impl Default for MavCmd {
1677    fn default() -> Self {
1678        Self::DEFAULT
1679    }
1680}
1681#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1682#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1683#[cfg_attr(feature = "serde", serde(tag = "type"))]
1684#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1685#[repr(u32)]
1686#[doc = "Possible actions an aircraft can take to avoid a collision."]
1687pub enum MavCollisionAction {
1688    #[doc = "Ignore any potential collisions"]
1689    MAV_COLLISION_ACTION_NONE = 0,
1690    #[doc = "Report potential collision"]
1691    MAV_COLLISION_ACTION_REPORT = 1,
1692    #[doc = "Ascend or Descend to avoid threat"]
1693    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1694    #[doc = "Move horizontally to avoid threat"]
1695    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1696    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1697    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1698    #[doc = "Aircraft to fly directly back to its launch point"]
1699    MAV_COLLISION_ACTION_RTL = 5,
1700    #[doc = "Aircraft to stop in place"]
1701    MAV_COLLISION_ACTION_HOVER = 6,
1702}
1703impl MavCollisionAction {
1704    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1705}
1706impl Default for MavCollisionAction {
1707    fn default() -> Self {
1708        Self::DEFAULT
1709    }
1710}
1711#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1713#[cfg_attr(feature = "serde", serde(tag = "type"))]
1714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1715#[repr(u32)]
1716#[doc = "Source of information about this collision."]
1717pub enum MavCollisionSrc {
1718    #[doc = "ID field references ADSB_VEHICLE packets"]
1719    MAV_COLLISION_SRC_ADSB = 0,
1720    #[doc = "ID field references MAVLink SRC ID"]
1721    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1722}
1723impl MavCollisionSrc {
1724    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1725}
1726impl Default for MavCollisionSrc {
1727    fn default() -> Self {
1728        Self::DEFAULT
1729    }
1730}
1731#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1733#[cfg_attr(feature = "serde", serde(tag = "type"))]
1734#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1735#[repr(u32)]
1736#[doc = "Aircraft-rated danger from this threat."]
1737pub enum MavCollisionThreatLevel {
1738    #[doc = "Not a threat"]
1739    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1740    #[doc = "Craft is mildly concerned about this threat"]
1741    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1742    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1743    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1744}
1745impl MavCollisionThreatLevel {
1746    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1747}
1748impl Default for MavCollisionThreatLevel {
1749    fn default() -> Self {
1750        Self::DEFAULT
1751    }
1752}
1753#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1755#[cfg_attr(feature = "serde", serde(tag = "type"))]
1756#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1757#[repr(u32)]
1758#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1759pub enum MavComponent {
1760    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1761    MAV_COMP_ID_ALL = 0,
1762    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1763    MAV_COMP_ID_AUTOPILOT1 = 1,
1764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1765    MAV_COMP_ID_USER1 = 25,
1766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1767    MAV_COMP_ID_USER2 = 26,
1768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1769    MAV_COMP_ID_USER3 = 27,
1770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1771    MAV_COMP_ID_USER4 = 28,
1772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1773    MAV_COMP_ID_USER5 = 29,
1774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1775    MAV_COMP_ID_USER6 = 30,
1776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1777    MAV_COMP_ID_USER7 = 31,
1778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1779    MAV_COMP_ID_USER8 = 32,
1780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1781    MAV_COMP_ID_USER9 = 33,
1782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1783    MAV_COMP_ID_USER10 = 34,
1784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1785    MAV_COMP_ID_USER11 = 35,
1786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1787    MAV_COMP_ID_USER12 = 36,
1788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1789    MAV_COMP_ID_USER13 = 37,
1790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1791    MAV_COMP_ID_USER14 = 38,
1792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1793    MAV_COMP_ID_USER15 = 39,
1794    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1795    MAV_COMP_ID_USER16 = 40,
1796    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1797    MAV_COMP_ID_USER17 = 41,
1798    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1799    MAV_COMP_ID_USER18 = 42,
1800    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1801    MAV_COMP_ID_USER19 = 43,
1802    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1803    MAV_COMP_ID_USER20 = 44,
1804    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1805    MAV_COMP_ID_USER21 = 45,
1806    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1807    MAV_COMP_ID_USER22 = 46,
1808    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1809    MAV_COMP_ID_USER23 = 47,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER24 = 48,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER25 = 49,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER26 = 50,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER27 = 51,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER28 = 52,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER29 = 53,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER30 = 54,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER31 = 55,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER32 = 56,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER33 = 57,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER34 = 58,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER35 = 59,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER36 = 60,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER37 = 61,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER38 = 62,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER39 = 63,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER40 = 64,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER41 = 65,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER42 = 66,
1848    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1849    MAV_COMP_ID_USER43 = 67,
1850    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1851    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER45 = 69,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER46 = 70,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER47 = 71,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER48 = 72,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER49 = 73,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER50 = 74,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER51 = 75,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER52 = 76,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER53 = 77,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER54 = 78,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER55 = 79,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER56 = 80,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER57 = 81,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER58 = 82,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER59 = 83,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER60 = 84,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER61 = 85,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER62 = 86,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER63 = 87,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER64 = 88,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER65 = 89,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER66 = 90,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER67 = 91,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER68 = 92,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER69 = 93,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER70 = 94,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER71 = 95,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER72 = 96,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER73 = 97,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER74 = 98,
1912    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1913    MAV_COMP_ID_USER75 = 99,
1914    #[doc = "Camera #1."]
1915    MAV_COMP_ID_CAMERA = 100,
1916    #[doc = "Camera #2."]
1917    MAV_COMP_ID_CAMERA2 = 101,
1918    #[doc = "Camera #3."]
1919    MAV_COMP_ID_CAMERA3 = 102,
1920    #[doc = "Camera #4."]
1921    MAV_COMP_ID_CAMERA4 = 103,
1922    #[doc = "Camera #5."]
1923    MAV_COMP_ID_CAMERA5 = 104,
1924    #[doc = "Camera #6."]
1925    MAV_COMP_ID_CAMERA6 = 105,
1926    #[doc = "Servo #1."]
1927    MAV_COMP_ID_SERVO1 = 140,
1928    #[doc = "Servo #2."]
1929    MAV_COMP_ID_SERVO2 = 141,
1930    #[doc = "Servo #3."]
1931    MAV_COMP_ID_SERVO3 = 142,
1932    #[doc = "Servo #4."]
1933    MAV_COMP_ID_SERVO4 = 143,
1934    #[doc = "Servo #5."]
1935    MAV_COMP_ID_SERVO5 = 144,
1936    #[doc = "Servo #6."]
1937    MAV_COMP_ID_SERVO6 = 145,
1938    #[doc = "Servo #7."]
1939    MAV_COMP_ID_SERVO7 = 146,
1940    #[doc = "Servo #8."]
1941    MAV_COMP_ID_SERVO8 = 147,
1942    #[doc = "Servo #9."]
1943    MAV_COMP_ID_SERVO9 = 148,
1944    #[doc = "Servo #10."]
1945    MAV_COMP_ID_SERVO10 = 149,
1946    #[doc = "Servo #11."]
1947    MAV_COMP_ID_SERVO11 = 150,
1948    #[doc = "Servo #12."]
1949    MAV_COMP_ID_SERVO12 = 151,
1950    #[doc = "Servo #13."]
1951    MAV_COMP_ID_SERVO13 = 152,
1952    #[doc = "Servo #14."]
1953    MAV_COMP_ID_SERVO14 = 153,
1954    #[doc = "Gimbal #1."]
1955    MAV_COMP_ID_GIMBAL = 154,
1956    #[doc = "Logging component."]
1957    MAV_COMP_ID_LOG = 155,
1958    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1959    MAV_COMP_ID_ADSB = 156,
1960    #[doc = "On Screen Display (OSD) devices for video links."]
1961    MAV_COMP_ID_OSD = 157,
1962    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1963    MAV_COMP_ID_PERIPHERAL = 158,
1964    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1965    #[doc = "Gimbal ID for QX1."]
1966    MAV_COMP_ID_QX1_GIMBAL = 159,
1967    #[doc = "FLARM collision alert component."]
1968    MAV_COMP_ID_FLARM = 160,
1969    #[doc = "Parachute component."]
1970    MAV_COMP_ID_PARACHUTE = 161,
1971    #[doc = "Winch component."]
1972    MAV_COMP_ID_WINCH = 169,
1973    #[doc = "Gimbal #2."]
1974    MAV_COMP_ID_GIMBAL2 = 171,
1975    #[doc = "Gimbal #3."]
1976    MAV_COMP_ID_GIMBAL3 = 172,
1977    #[doc = "Gimbal #4"]
1978    MAV_COMP_ID_GIMBAL4 = 173,
1979    #[doc = "Gimbal #5."]
1980    MAV_COMP_ID_GIMBAL5 = 174,
1981    #[doc = "Gimbal #6."]
1982    MAV_COMP_ID_GIMBAL6 = 175,
1983    #[doc = "Battery #1."]
1984    MAV_COMP_ID_BATTERY = 180,
1985    #[doc = "Battery #2."]
1986    MAV_COMP_ID_BATTERY2 = 181,
1987    #[doc = "CAN over MAVLink client."]
1988    MAV_COMP_ID_MAVCAN = 189,
1989    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1990    MAV_COMP_ID_MISSIONPLANNER = 190,
1991    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1992    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1993    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1994    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1995    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1996    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1997    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1998    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1999    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
2000    MAV_COMP_ID_PATHPLANNER = 195,
2001    #[doc = "Component that plans a collision free path between two points."]
2002    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2003    #[doc = "Component that provides position estimates using VIO techniques."]
2004    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2005    #[doc = "Component that manages pairing of vehicle and GCS."]
2006    MAV_COMP_ID_PAIRING_MANAGER = 198,
2007    #[doc = "Inertial Measurement Unit (IMU) #1."]
2008    MAV_COMP_ID_IMU = 200,
2009    #[doc = "Inertial Measurement Unit (IMU) #2."]
2010    MAV_COMP_ID_IMU_2 = 201,
2011    #[doc = "Inertial Measurement Unit (IMU) #3."]
2012    MAV_COMP_ID_IMU_3 = 202,
2013    #[doc = "GPS #1."]
2014    MAV_COMP_ID_GPS = 220,
2015    #[doc = "GPS #2."]
2016    MAV_COMP_ID_GPS2 = 221,
2017    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2018    MAV_COMP_ID_ODID_TXRX_1 = 236,
2019    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2020    MAV_COMP_ID_ODID_TXRX_2 = 237,
2021    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2022    MAV_COMP_ID_ODID_TXRX_3 = 238,
2023    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2024    MAV_COMP_ID_UDP_BRIDGE = 240,
2025    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2026    MAV_COMP_ID_UART_BRIDGE = 241,
2027    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2028    MAV_COMP_ID_TUNNEL_NODE = 242,
2029    #[doc = "Illuminator"]
2030    MAV_COMP_ID_ILLUMINATOR = 243,
2031    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2032    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2033    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2034}
2035impl MavComponent {
2036    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2037}
2038impl Default for MavComponent {
2039    fn default() -> Self {
2040        Self::DEFAULT
2041    }
2042}
2043#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2045#[cfg_attr(feature = "serde", serde(tag = "type"))]
2046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2047#[repr(u32)]
2048#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2049#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2050pub enum MavDataStream {
2051    #[doc = "Enable all data streams"]
2052    MAV_DATA_STREAM_ALL = 0,
2053    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2054    MAV_DATA_STREAM_RAW_SENSORS = 1,
2055    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2056    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2057    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2058    MAV_DATA_STREAM_RC_CHANNELS = 3,
2059    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2060    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2061    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2062    MAV_DATA_STREAM_POSITION = 6,
2063    #[doc = "Dependent on the autopilot"]
2064    MAV_DATA_STREAM_EXTRA1 = 10,
2065    #[doc = "Dependent on the autopilot"]
2066    MAV_DATA_STREAM_EXTRA2 = 11,
2067    #[doc = "Dependent on the autopilot"]
2068    MAV_DATA_STREAM_EXTRA3 = 12,
2069}
2070impl MavDataStream {
2071    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2072}
2073impl Default for MavDataStream {
2074    fn default() -> Self {
2075        Self::DEFAULT
2076    }
2077}
2078#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2080#[cfg_attr(feature = "serde", serde(tag = "type"))]
2081#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2082#[repr(u32)]
2083#[doc = "Enumeration of distance sensor types"]
2084pub enum MavDistanceSensor {
2085    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2086    MAV_DISTANCE_SENSOR_LASER = 0,
2087    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2088    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2089    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2090    MAV_DISTANCE_SENSOR_INFRARED = 2,
2091    #[doc = "Radar type, e.g. uLanding units"]
2092    MAV_DISTANCE_SENSOR_RADAR = 3,
2093    #[doc = "Broken or unknown type, e.g. analog units"]
2094    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2095}
2096impl MavDistanceSensor {
2097    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2098}
2099impl Default for MavDistanceSensor {
2100    fn default() -> Self {
2101        Self::DEFAULT
2102    }
2103}
2104#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2105#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2106#[cfg_attr(feature = "serde", serde(tag = "type"))]
2107#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2108#[repr(u32)]
2109#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2110pub enum MavDoRepositionFlags {
2111    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2112    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2113}
2114impl MavDoRepositionFlags {
2115    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2116}
2117impl Default for MavDoRepositionFlags {
2118    fn default() -> Self {
2119        Self::DEFAULT
2120    }
2121}
2122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2124#[cfg_attr(feature = "serde", serde(tag = "type"))]
2125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2126#[repr(u32)]
2127#[doc = "Enumeration of estimator types"]
2128pub enum MavEstimatorType {
2129    #[doc = "Unknown type of the estimator."]
2130    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2131    #[doc = "This is a naive estimator without any real covariance feedback."]
2132    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2133    #[doc = "Computer vision based estimate. Might be up to scale."]
2134    MAV_ESTIMATOR_TYPE_VISION = 2,
2135    #[doc = "Visual-inertial estimate."]
2136    MAV_ESTIMATOR_TYPE_VIO = 3,
2137    #[doc = "Plain GPS estimate."]
2138    MAV_ESTIMATOR_TYPE_GPS = 4,
2139    #[doc = "Estimator integrating GPS and inertial sensing."]
2140    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2141    #[doc = "Estimate from external motion capturing system."]
2142    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2143    #[doc = "Estimator based on lidar sensor input."]
2144    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2145    #[doc = "Estimator on autopilot."]
2146    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2147}
2148impl MavEstimatorType {
2149    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2150}
2151impl Default for MavEstimatorType {
2152    fn default() -> Self {
2153        Self::DEFAULT
2154    }
2155}
2156#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2157#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2158#[cfg_attr(feature = "serde", serde(tag = "type"))]
2159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2160#[repr(u32)]
2161#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2162pub enum MavEventCurrentSequenceFlags {
2163    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2164    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2165}
2166impl MavEventCurrentSequenceFlags {
2167    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2168}
2169impl Default for MavEventCurrentSequenceFlags {
2170    fn default() -> Self {
2171        Self::DEFAULT
2172    }
2173}
2174#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2175#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2176#[cfg_attr(feature = "serde", serde(tag = "type"))]
2177#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2178#[repr(u32)]
2179#[doc = "Reason for an event error response."]
2180pub enum MavEventErrorReason {
2181    #[doc = "The requested event is not available (anymore)."]
2182    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2183}
2184impl MavEventErrorReason {
2185    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2186}
2187impl Default for MavEventErrorReason {
2188    fn default() -> Self {
2189        Self::DEFAULT
2190    }
2191}
2192#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2193#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2194#[cfg_attr(feature = "serde", serde(tag = "type"))]
2195#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2196#[repr(u32)]
2197#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2198pub enum MavFrame {
2199    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2200    MAV_FRAME_GLOBAL = 0,
2201    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2202    MAV_FRAME_LOCAL_NED = 1,
2203    #[doc = "NOT a coordinate frame, indicates a mission command."]
2204    MAV_FRAME_MISSION = 2,
2205    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2206    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2207    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2208    MAV_FRAME_LOCAL_ENU = 4,
2209    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2210    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2211    MAV_FRAME_GLOBAL_INT = 5,
2212    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2213    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2214    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2215    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2216    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2217    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2218    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2219    MAV_FRAME_BODY_NED = 8,
2220    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2221    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2222    MAV_FRAME_BODY_OFFSET_NED = 9,
2223    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2224    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2225    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2226    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2227    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2228    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2229    MAV_FRAME_BODY_FRD = 12,
2230    #[deprecated = "  (Deprecated since 2019-04)"]
2231    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2232    MAV_FRAME_RESERVED_13 = 13,
2233    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2234    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2235    MAV_FRAME_RESERVED_14 = 14,
2236    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2237    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2238    MAV_FRAME_RESERVED_15 = 15,
2239    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2240    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2241    MAV_FRAME_RESERVED_16 = 16,
2242    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2243    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2244    MAV_FRAME_RESERVED_17 = 17,
2245    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2246    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2247    MAV_FRAME_RESERVED_18 = 18,
2248    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2249    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2250    MAV_FRAME_RESERVED_19 = 19,
2251    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2252    MAV_FRAME_LOCAL_FRD = 20,
2253    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2254    MAV_FRAME_LOCAL_FLU = 21,
2255}
2256impl MavFrame {
2257    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2258}
2259impl Default for MavFrame {
2260    fn default() -> Self {
2261        Self::DEFAULT
2262    }
2263}
2264#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2265#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2266#[cfg_attr(feature = "serde", serde(tag = "type"))]
2267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2268#[repr(u32)]
2269#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2270pub enum MavFtpErr {
2271    #[doc = "None: No error"]
2272    MAV_FTP_ERR_NONE = 0,
2273    #[doc = "Fail: Unknown failure"]
2274    MAV_FTP_ERR_FAIL = 1,
2275    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2276    MAV_FTP_ERR_FAILERRNO = 2,
2277    #[doc = "InvalidDataSize: Payload size is invalid"]
2278    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2279    #[doc = "InvalidSession: Session is not currently open"]
2280    MAV_FTP_ERR_INVALIDSESSION = 4,
2281    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2282    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2283    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2284    MAV_FTP_ERR_EOF = 6,
2285    #[doc = "UnknownCommand: Unknown command / opcode"]
2286    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2287    #[doc = "FileExists: File/directory already exists"]
2288    MAV_FTP_ERR_FILEEXISTS = 8,
2289    #[doc = "FileProtected: File/directory is write protected"]
2290    MAV_FTP_ERR_FILEPROTECTED = 9,
2291    #[doc = "FileNotFound: File/directory not found"]
2292    MAV_FTP_ERR_FILENOTFOUND = 10,
2293}
2294impl MavFtpErr {
2295    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2296}
2297impl Default for MavFtpErr {
2298    fn default() -> Self {
2299        Self::DEFAULT
2300    }
2301}
2302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2304#[cfg_attr(feature = "serde", serde(tag = "type"))]
2305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2306#[repr(u32)]
2307#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2308pub enum MavFtpOpcode {
2309    #[doc = "None. Ignored, always ACKed"]
2310    MAV_FTP_OPCODE_NONE = 0,
2311    #[doc = "TerminateSession: Terminates open Read session"]
2312    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2313    #[doc = "ResetSessions: Terminates all open read sessions"]
2314    MAV_FTP_OPCODE_RESETSESSION = 2,
2315    #[doc = "ListDirectory. List files and directories in path from offset"]
2316    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2317    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2318    MAV_FTP_OPCODE_OPENFILERO = 4,
2319    #[doc = "ReadFile: Reads size bytes from offset in session"]
2320    MAV_FTP_OPCODE_READFILE = 5,
2321    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2322    MAV_FTP_OPCODE_CREATEFILE = 6,
2323    #[doc = "WriteFile: Writes size bytes to offset in session"]
2324    MAV_FTP_OPCODE_WRITEFILE = 7,
2325    #[doc = "RemoveFile: Remove file at path"]
2326    MAV_FTP_OPCODE_REMOVEFILE = 8,
2327    #[doc = "CreateDirectory: Creates directory at path"]
2328    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2329    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2330    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2331    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2332    MAV_FTP_OPCODE_OPENFILEWO = 11,
2333    #[doc = "TruncateFile: Truncate file at path to offset length"]
2334    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2335    #[doc = "Rename: Rename path1 to path2"]
2336    MAV_FTP_OPCODE_RENAME = 13,
2337    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2338    MAV_FTP_OPCODE_CALCFILECRC = 14,
2339    #[doc = "BurstReadFile: Burst download session file"]
2340    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2341    #[doc = "ACK: ACK response"]
2342    MAV_FTP_OPCODE_ACK = 128,
2343    #[doc = "NAK: NAK response"]
2344    MAV_FTP_OPCODE_NAK = 129,
2345}
2346impl MavFtpOpcode {
2347    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2348}
2349impl Default for MavFtpOpcode {
2350    fn default() -> Self {
2351        Self::DEFAULT
2352    }
2353}
2354#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2355#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2356#[cfg_attr(feature = "serde", serde(tag = "type"))]
2357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2358#[repr(u32)]
2359#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2360pub enum MavFuelType {
2361    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2362    MAV_FUEL_TYPE_UNKNOWN = 0,
2363    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2364    MAV_FUEL_TYPE_LIQUID = 1,
2365    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2366    MAV_FUEL_TYPE_GAS = 2,
2367}
2368impl MavFuelType {
2369    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2370}
2371impl Default for MavFuelType {
2372    fn default() -> Self {
2373        Self::DEFAULT
2374    }
2375}
2376bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2377impl MavGeneratorStatusFlag {
2378    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2379}
2380impl Default for MavGeneratorStatusFlag {
2381    fn default() -> Self {
2382        Self::DEFAULT
2383    }
2384}
2385#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2387#[cfg_attr(feature = "serde", serde(tag = "type"))]
2388#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2389#[repr(u32)]
2390#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2391pub enum MavGoto {
2392    #[doc = "Hold at the current position."]
2393    MAV_GOTO_DO_HOLD = 0,
2394    #[doc = "Continue with the next item in mission execution."]
2395    MAV_GOTO_DO_CONTINUE = 1,
2396    #[doc = "Hold at the current position of the system"]
2397    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2398    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2399    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2400}
2401impl MavGoto {
2402    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2403}
2404impl Default for MavGoto {
2405    fn default() -> Self {
2406        Self::DEFAULT
2407    }
2408}
2409#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2410#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2411#[cfg_attr(feature = "serde", serde(tag = "type"))]
2412#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2413#[repr(u32)]
2414#[doc = "Enumeration of landed detector states"]
2415pub enum MavLandedState {
2416    #[doc = "MAV landed state is unknown"]
2417    MAV_LANDED_STATE_UNDEFINED = 0,
2418    #[doc = "MAV is landed (on ground)"]
2419    MAV_LANDED_STATE_ON_GROUND = 1,
2420    #[doc = "MAV is in air"]
2421    MAV_LANDED_STATE_IN_AIR = 2,
2422    #[doc = "MAV currently taking off"]
2423    MAV_LANDED_STATE_TAKEOFF = 3,
2424    #[doc = "MAV currently landing"]
2425    MAV_LANDED_STATE_LANDING = 4,
2426}
2427impl MavLandedState {
2428    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2429}
2430impl Default for MavLandedState {
2431    fn default() -> Self {
2432        Self::DEFAULT
2433    }
2434}
2435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2437#[cfg_attr(feature = "serde", serde(tag = "type"))]
2438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2439#[repr(u32)]
2440#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2441pub enum MavMissionResult {
2442    #[doc = "mission accepted OK"]
2443    MAV_MISSION_ACCEPTED = 0,
2444    #[doc = "Generic error / not accepting mission commands at all right now."]
2445    MAV_MISSION_ERROR = 1,
2446    #[doc = "Coordinate frame is not supported."]
2447    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2448    #[doc = "Command is not supported."]
2449    MAV_MISSION_UNSUPPORTED = 3,
2450    #[doc = "Mission items exceed storage space."]
2451    MAV_MISSION_NO_SPACE = 4,
2452    #[doc = "One of the parameters has an invalid value."]
2453    MAV_MISSION_INVALID = 5,
2454    #[doc = "param1 has an invalid value."]
2455    MAV_MISSION_INVALID_PARAM1 = 6,
2456    #[doc = "param2 has an invalid value."]
2457    MAV_MISSION_INVALID_PARAM2 = 7,
2458    #[doc = "param3 has an invalid value."]
2459    MAV_MISSION_INVALID_PARAM3 = 8,
2460    #[doc = "param4 has an invalid value."]
2461    MAV_MISSION_INVALID_PARAM4 = 9,
2462    #[doc = "x / param5 has an invalid value."]
2463    MAV_MISSION_INVALID_PARAM5_X = 10,
2464    #[doc = "y / param6 has an invalid value."]
2465    MAV_MISSION_INVALID_PARAM6_Y = 11,
2466    #[doc = "z / param7 has an invalid value."]
2467    MAV_MISSION_INVALID_PARAM7 = 12,
2468    #[doc = "Mission item received out of sequence"]
2469    MAV_MISSION_INVALID_SEQUENCE = 13,
2470    #[doc = "Not accepting any mission commands from this communication partner."]
2471    MAV_MISSION_DENIED = 14,
2472    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2473    MAV_MISSION_OPERATION_CANCELLED = 15,
2474}
2475impl MavMissionResult {
2476    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2477}
2478impl Default for MavMissionResult {
2479    fn default() -> Self {
2480        Self::DEFAULT
2481    }
2482}
2483#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2484#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2485#[cfg_attr(feature = "serde", serde(tag = "type"))]
2486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2487#[repr(u32)]
2488#[doc = "Type of mission items being requested/sent in mission protocol."]
2489pub enum MavMissionType {
2490    #[doc = "Items are mission commands for main mission."]
2491    MAV_MISSION_TYPE_MISSION = 0,
2492    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2493    MAV_MISSION_TYPE_FENCE = 1,
2494    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2495    MAV_MISSION_TYPE_RALLY = 2,
2496    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2497    MAV_MISSION_TYPE_ALL = 255,
2498}
2499impl MavMissionType {
2500    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2501}
2502impl Default for MavMissionType {
2503    fn default() -> Self {
2504        Self::DEFAULT
2505    }
2506}
2507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2509#[cfg_attr(feature = "serde", serde(tag = "type"))]
2510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2511#[repr(u32)]
2512#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2513pub enum MavMode {
2514    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2515    MAV_MODE_PREFLIGHT = 0,
2516    #[doc = "System is allowed to be active, under assisted RC control."]
2517    MAV_MODE_STABILIZE_DISARMED = 80,
2518    #[doc = "System is allowed to be active, under assisted RC control."]
2519    MAV_MODE_STABILIZE_ARMED = 208,
2520    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2521    MAV_MODE_MANUAL_DISARMED = 64,
2522    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2523    MAV_MODE_MANUAL_ARMED = 192,
2524    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2525    MAV_MODE_GUIDED_DISARMED = 88,
2526    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2527    MAV_MODE_GUIDED_ARMED = 216,
2528    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2529    MAV_MODE_AUTO_DISARMED = 92,
2530    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2531    MAV_MODE_AUTO_ARMED = 220,
2532    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2533    MAV_MODE_TEST_DISARMED = 66,
2534    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2535    MAV_MODE_TEST_ARMED = 194,
2536}
2537impl MavMode {
2538    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2539}
2540impl Default for MavMode {
2541    fn default() -> Self {
2542        Self::DEFAULT
2543    }
2544}
2545bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2546impl MavModeFlag {
2547    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2548}
2549impl Default for MavModeFlag {
2550    fn default() -> Self {
2551        Self::DEFAULT
2552    }
2553}
2554#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2555#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2556#[cfg_attr(feature = "serde", serde(tag = "type"))]
2557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2558#[repr(u32)]
2559#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2560pub enum MavModeFlagDecodePosition {
2561    #[doc = "First bit:  10000000"]
2562    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2563    #[doc = "Second bit: 01000000"]
2564    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2565    #[doc = "Third bit:  00100000"]
2566    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2567    #[doc = "Fourth bit: 00010000"]
2568    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2569    #[doc = "Fifth bit:  00001000"]
2570    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2571    #[doc = "Sixth bit:   00000100"]
2572    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2573    #[doc = "Seventh bit: 00000010"]
2574    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2575    #[doc = "Eighth bit: 00000001"]
2576    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2577}
2578impl MavModeFlagDecodePosition {
2579    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2580}
2581impl Default for MavModeFlagDecodePosition {
2582    fn default() -> Self {
2583        Self::DEFAULT
2584    }
2585}
2586bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2587impl MavModeProperty {
2588    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2589}
2590impl Default for MavModeProperty {
2591    fn default() -> Self {
2592        Self::DEFAULT
2593    }
2594}
2595#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2596#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2597#[cfg_attr(feature = "serde", serde(tag = "type"))]
2598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2599#[repr(u32)]
2600#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2601#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2602pub enum MavMountMode {
2603    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2604    MAV_MOUNT_MODE_RETRACT = 0,
2605    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2606    MAV_MOUNT_MODE_NEUTRAL = 1,
2607    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2608    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2609    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2610    MAV_MOUNT_MODE_RC_TARGETING = 3,
2611    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2612    MAV_MOUNT_MODE_GPS_POINT = 4,
2613    #[doc = "Gimbal tracks system with specified system ID"]
2614    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2615    #[doc = "Gimbal tracks home position"]
2616    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2617}
2618impl MavMountMode {
2619    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2620}
2621impl Default for MavMountMode {
2622    fn default() -> Self {
2623        Self::DEFAULT
2624    }
2625}
2626#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2627#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2628#[cfg_attr(feature = "serde", serde(tag = "type"))]
2629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2630#[repr(u32)]
2631pub enum MavOdidArmStatus {
2632    #[doc = "Passing arming checks."]
2633    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2634    #[doc = "Generic arming failure, see error string for details."]
2635    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2636}
2637impl MavOdidArmStatus {
2638    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2639}
2640impl Default for MavOdidArmStatus {
2641    fn default() -> Self {
2642        Self::DEFAULT
2643    }
2644}
2645#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2646#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2647#[cfg_attr(feature = "serde", serde(tag = "type"))]
2648#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2649#[repr(u32)]
2650pub enum MavOdidAuthType {
2651    #[doc = "No authentication type is specified."]
2652    MAV_ODID_AUTH_TYPE_NONE = 0,
2653    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2654    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2655    #[doc = "Signature for the Operator ID."]
2656    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2657    #[doc = "Signature for the entire message set."]
2658    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2659    #[doc = "Authentication is provided by Network Remote ID."]
2660    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2661    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2662    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2663}
2664impl MavOdidAuthType {
2665    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2666}
2667impl Default for MavOdidAuthType {
2668    fn default() -> Self {
2669        Self::DEFAULT
2670    }
2671}
2672#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2674#[cfg_attr(feature = "serde", serde(tag = "type"))]
2675#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2676#[repr(u32)]
2677pub enum MavOdidCategoryEu {
2678    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2679    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2680    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2681    MAV_ODID_CATEGORY_EU_OPEN = 1,
2682    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2683    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2684    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2685    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2686}
2687impl MavOdidCategoryEu {
2688    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2689}
2690impl Default for MavOdidCategoryEu {
2691    fn default() -> Self {
2692        Self::DEFAULT
2693    }
2694}
2695#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2696#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2697#[cfg_attr(feature = "serde", serde(tag = "type"))]
2698#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2699#[repr(u32)]
2700pub enum MavOdidClassEu {
2701    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2702    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2703    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2704    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2705    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2706    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2707    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2708    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2709    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2710    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2711    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2712    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2713    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2714    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2715    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2716    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2717}
2718impl MavOdidClassEu {
2719    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2720}
2721impl Default for MavOdidClassEu {
2722    fn default() -> Self {
2723        Self::DEFAULT
2724    }
2725}
2726#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2727#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2728#[cfg_attr(feature = "serde", serde(tag = "type"))]
2729#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2730#[repr(u32)]
2731pub enum MavOdidClassificationType {
2732    #[doc = "The classification type for the UA is undeclared."]
2733    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2734    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2735    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2736}
2737impl MavOdidClassificationType {
2738    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2739}
2740impl Default for MavOdidClassificationType {
2741    fn default() -> Self {
2742        Self::DEFAULT
2743    }
2744}
2745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2747#[cfg_attr(feature = "serde", serde(tag = "type"))]
2748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2749#[repr(u32)]
2750pub enum MavOdidDescType {
2751    #[doc = "Optional free-form text description of the purpose of the flight."]
2752    MAV_ODID_DESC_TYPE_TEXT = 0,
2753    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2754    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2755    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2756    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2757}
2758impl MavOdidDescType {
2759    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2760}
2761impl Default for MavOdidDescType {
2762    fn default() -> Self {
2763        Self::DEFAULT
2764    }
2765}
2766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2768#[cfg_attr(feature = "serde", serde(tag = "type"))]
2769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2770#[repr(u32)]
2771pub enum MavOdidHeightRef {
2772    #[doc = "The height field is relative to the take-off location."]
2773    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2774    #[doc = "The height field is relative to ground."]
2775    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2776}
2777impl MavOdidHeightRef {
2778    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2779}
2780impl Default for MavOdidHeightRef {
2781    fn default() -> Self {
2782        Self::DEFAULT
2783    }
2784}
2785#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2787#[cfg_attr(feature = "serde", serde(tag = "type"))]
2788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2789#[repr(u32)]
2790pub enum MavOdidHorAcc {
2791    #[doc = "The horizontal accuracy is unknown."]
2792    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2793    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2794    MAV_ODID_HOR_ACC_10NM = 1,
2795    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2796    MAV_ODID_HOR_ACC_4NM = 2,
2797    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2798    MAV_ODID_HOR_ACC_2NM = 3,
2799    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2800    MAV_ODID_HOR_ACC_1NM = 4,
2801    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2802    MAV_ODID_HOR_ACC_0_5NM = 5,
2803    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2804    MAV_ODID_HOR_ACC_0_3NM = 6,
2805    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2806    MAV_ODID_HOR_ACC_0_1NM = 7,
2807    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2808    MAV_ODID_HOR_ACC_0_05NM = 8,
2809    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2810    MAV_ODID_HOR_ACC_30_METER = 9,
2811    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2812    MAV_ODID_HOR_ACC_10_METER = 10,
2813    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2814    MAV_ODID_HOR_ACC_3_METER = 11,
2815    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2816    MAV_ODID_HOR_ACC_1_METER = 12,
2817}
2818impl MavOdidHorAcc {
2819    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2820}
2821impl Default for MavOdidHorAcc {
2822    fn default() -> Self {
2823        Self::DEFAULT
2824    }
2825}
2826#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2828#[cfg_attr(feature = "serde", serde(tag = "type"))]
2829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2830#[repr(u32)]
2831pub enum MavOdidIdType {
2832    #[doc = "No type defined."]
2833    MAV_ODID_ID_TYPE_NONE = 0,
2834    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2835    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2836    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2837    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2838    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2839    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2840    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2841    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2842}
2843impl MavOdidIdType {
2844    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2845}
2846impl Default for MavOdidIdType {
2847    fn default() -> Self {
2848        Self::DEFAULT
2849    }
2850}
2851#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2852#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2853#[cfg_attr(feature = "serde", serde(tag = "type"))]
2854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2855#[repr(u32)]
2856pub enum MavOdidOperatorIdType {
2857    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2858    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2859}
2860impl MavOdidOperatorIdType {
2861    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2862}
2863impl Default for MavOdidOperatorIdType {
2864    fn default() -> Self {
2865        Self::DEFAULT
2866    }
2867}
2868#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2869#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2870#[cfg_attr(feature = "serde", serde(tag = "type"))]
2871#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2872#[repr(u32)]
2873pub enum MavOdidOperatorLocationType {
2874    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2875    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2876    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2877    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2878    #[doc = "The location/altitude of the operator are fixed values."]
2879    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2880}
2881impl MavOdidOperatorLocationType {
2882    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2883}
2884impl Default for MavOdidOperatorLocationType {
2885    fn default() -> Self {
2886        Self::DEFAULT
2887    }
2888}
2889#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2891#[cfg_attr(feature = "serde", serde(tag = "type"))]
2892#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2893#[repr(u32)]
2894pub enum MavOdidSpeedAcc {
2895    #[doc = "The speed accuracy is unknown."]
2896    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2897    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2898    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2899    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2900    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2901    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2902    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2903    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2904    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2905}
2906impl MavOdidSpeedAcc {
2907    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2908}
2909impl Default for MavOdidSpeedAcc {
2910    fn default() -> Self {
2911        Self::DEFAULT
2912    }
2913}
2914#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2916#[cfg_attr(feature = "serde", serde(tag = "type"))]
2917#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2918#[repr(u32)]
2919pub enum MavOdidStatus {
2920    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2921    MAV_ODID_STATUS_UNDECLARED = 0,
2922    #[doc = "The UA is on the ground."]
2923    MAV_ODID_STATUS_GROUND = 1,
2924    #[doc = "The UA is in the air."]
2925    MAV_ODID_STATUS_AIRBORNE = 2,
2926    #[doc = "The UA is having an emergency."]
2927    MAV_ODID_STATUS_EMERGENCY = 3,
2928    #[doc = "The remote ID system is failing or unreliable in some way."]
2929    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2930}
2931impl MavOdidStatus {
2932    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2933}
2934impl Default for MavOdidStatus {
2935    fn default() -> Self {
2936        Self::DEFAULT
2937    }
2938}
2939#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2940#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2941#[cfg_attr(feature = "serde", serde(tag = "type"))]
2942#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2943#[repr(u32)]
2944pub enum MavOdidTimeAcc {
2945    #[doc = "The timestamp accuracy is unknown."]
2946    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2947    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2948    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2949    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2950    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2951    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2952    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2953    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2954    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2955    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2956    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2957    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2958    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2959    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2960    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2961    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2962    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2963    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2964    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2965    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2966    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2967    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2968    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2969    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2970    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2971    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2972    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2973    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2974    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2975    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2976    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2977}
2978impl MavOdidTimeAcc {
2979    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2980}
2981impl Default for MavOdidTimeAcc {
2982    fn default() -> Self {
2983        Self::DEFAULT
2984    }
2985}
2986#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2987#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2988#[cfg_attr(feature = "serde", serde(tag = "type"))]
2989#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2990#[repr(u32)]
2991pub enum MavOdidUaType {
2992    #[doc = "No UA (Unmanned Aircraft) type defined."]
2993    MAV_ODID_UA_TYPE_NONE = 0,
2994    #[doc = "Aeroplane/Airplane. Fixed wing."]
2995    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2996    #[doc = "Helicopter or multirotor."]
2997    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2998    #[doc = "Gyroplane."]
2999    MAV_ODID_UA_TYPE_GYROPLANE = 3,
3000    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
3001    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3002    #[doc = "Ornithopter."]
3003    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3004    #[doc = "Glider."]
3005    MAV_ODID_UA_TYPE_GLIDER = 6,
3006    #[doc = "Kite."]
3007    MAV_ODID_UA_TYPE_KITE = 7,
3008    #[doc = "Free Balloon."]
3009    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3010    #[doc = "Captive Balloon."]
3011    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3012    #[doc = "Airship. E.g. a blimp."]
3013    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3014    #[doc = "Free Fall/Parachute (unpowered)."]
3015    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3016    #[doc = "Rocket."]
3017    MAV_ODID_UA_TYPE_ROCKET = 12,
3018    #[doc = "Tethered powered aircraft."]
3019    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3020    #[doc = "Ground Obstacle."]
3021    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3022    #[doc = "Other type of aircraft not listed earlier."]
3023    MAV_ODID_UA_TYPE_OTHER = 15,
3024}
3025impl MavOdidUaType {
3026    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3027}
3028impl Default for MavOdidUaType {
3029    fn default() -> Self {
3030        Self::DEFAULT
3031    }
3032}
3033#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3034#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3035#[cfg_attr(feature = "serde", serde(tag = "type"))]
3036#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3037#[repr(u32)]
3038pub enum MavOdidVerAcc {
3039    #[doc = "The vertical accuracy is unknown."]
3040    MAV_ODID_VER_ACC_UNKNOWN = 0,
3041    #[doc = "The vertical accuracy is smaller than 150 meter."]
3042    MAV_ODID_VER_ACC_150_METER = 1,
3043    #[doc = "The vertical accuracy is smaller than 45 meter."]
3044    MAV_ODID_VER_ACC_45_METER = 2,
3045    #[doc = "The vertical accuracy is smaller than 25 meter."]
3046    MAV_ODID_VER_ACC_25_METER = 3,
3047    #[doc = "The vertical accuracy is smaller than 10 meter."]
3048    MAV_ODID_VER_ACC_10_METER = 4,
3049    #[doc = "The vertical accuracy is smaller than 3 meter."]
3050    MAV_ODID_VER_ACC_3_METER = 5,
3051    #[doc = "The vertical accuracy is smaller than 1 meter."]
3052    MAV_ODID_VER_ACC_1_METER = 6,
3053}
3054impl MavOdidVerAcc {
3055    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3056}
3057impl Default for MavOdidVerAcc {
3058    fn default() -> Self {
3059        Self::DEFAULT
3060    }
3061}
3062#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3063#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3064#[cfg_attr(feature = "serde", serde(tag = "type"))]
3065#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3066#[repr(u32)]
3067#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3068pub enum MavParamExtType {
3069    #[doc = "8-bit unsigned integer"]
3070    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3071    #[doc = "8-bit signed integer"]
3072    MAV_PARAM_EXT_TYPE_INT8 = 2,
3073    #[doc = "16-bit unsigned integer"]
3074    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3075    #[doc = "16-bit signed integer"]
3076    MAV_PARAM_EXT_TYPE_INT16 = 4,
3077    #[doc = "32-bit unsigned integer"]
3078    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3079    #[doc = "32-bit signed integer"]
3080    MAV_PARAM_EXT_TYPE_INT32 = 6,
3081    #[doc = "64-bit unsigned integer"]
3082    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3083    #[doc = "64-bit signed integer"]
3084    MAV_PARAM_EXT_TYPE_INT64 = 8,
3085    #[doc = "32-bit floating-point"]
3086    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3087    #[doc = "64-bit floating-point"]
3088    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3089    #[doc = "Custom Type"]
3090    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3091}
3092impl MavParamExtType {
3093    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3094}
3095impl Default for MavParamExtType {
3096    fn default() -> Self {
3097        Self::DEFAULT
3098    }
3099}
3100#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3102#[cfg_attr(feature = "serde", serde(tag = "type"))]
3103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3104#[repr(u32)]
3105#[doc = "Specifies the datatype of a MAVLink parameter."]
3106pub enum MavParamType {
3107    #[doc = "8-bit unsigned integer"]
3108    MAV_PARAM_TYPE_UINT8 = 1,
3109    #[doc = "8-bit signed integer"]
3110    MAV_PARAM_TYPE_INT8 = 2,
3111    #[doc = "16-bit unsigned integer"]
3112    MAV_PARAM_TYPE_UINT16 = 3,
3113    #[doc = "16-bit signed integer"]
3114    MAV_PARAM_TYPE_INT16 = 4,
3115    #[doc = "32-bit unsigned integer"]
3116    MAV_PARAM_TYPE_UINT32 = 5,
3117    #[doc = "32-bit signed integer"]
3118    MAV_PARAM_TYPE_INT32 = 6,
3119    #[doc = "64-bit unsigned integer"]
3120    MAV_PARAM_TYPE_UINT64 = 7,
3121    #[doc = "64-bit signed integer"]
3122    MAV_PARAM_TYPE_INT64 = 8,
3123    #[doc = "32-bit floating-point"]
3124    MAV_PARAM_TYPE_REAL32 = 9,
3125    #[doc = "64-bit floating-point"]
3126    MAV_PARAM_TYPE_REAL64 = 10,
3127}
3128impl MavParamType {
3129    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3130}
3131impl Default for MavParamType {
3132    fn default() -> Self {
3133        Self::DEFAULT
3134    }
3135}
3136bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3137impl MavPowerStatus {
3138    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3139}
3140impl Default for MavPowerStatus {
3141    fn default() -> Self {
3142        Self::DEFAULT
3143    }
3144}
3145#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3147#[cfg_attr(feature = "serde", serde(tag = "type"))]
3148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3149#[repr(u32)]
3150#[doc = "Action required when performing CMD_PREFLIGHT_STORAGE"]
3151pub enum MavPreflightStorageAction {
3152    #[doc = "Read all parameters from storage"]
3153    MAV_PFS_CMD_READ_ALL = 0,
3154    #[doc = "Write all parameters to storage"]
3155    MAV_PFS_CMD_WRITE_ALL = 1,
3156    #[doc = "Clear all  parameters in storage"]
3157    MAV_PFS_CMD_CLEAR_ALL = 2,
3158    #[doc = "Read specific parameters from storage"]
3159    MAV_PFS_CMD_READ_SPECIFIC = 3,
3160    #[doc = "Write specific parameters to storage"]
3161    MAV_PFS_CMD_WRITE_SPECIFIC = 4,
3162    #[doc = "Clear specific parameters in storage"]
3163    MAV_PFS_CMD_CLEAR_SPECIFIC = 5,
3164    #[doc = "do nothing"]
3165    MAV_PFS_CMD_DO_NOTHING = 6,
3166}
3167impl MavPreflightStorageAction {
3168    pub const DEFAULT: Self = Self::MAV_PFS_CMD_READ_ALL;
3169}
3170impl Default for MavPreflightStorageAction {
3171    fn default() -> Self {
3172        Self::DEFAULT
3173    }
3174}
3175bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3176impl MavProtocolCapability {
3177    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3178}
3179impl Default for MavProtocolCapability {
3180    fn default() -> Self {
3181        Self::DEFAULT
3182    }
3183}
3184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3186#[cfg_attr(feature = "serde", serde(tag = "type"))]
3187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3188#[repr(u32)]
3189#[doc = "Result from a MAVLink command (MAV_CMD)"]
3190pub enum MavResult {
3191    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3192    MAV_RESULT_ACCEPTED = 0,
3193    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3194    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3195    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3196    MAV_RESULT_DENIED = 2,
3197    #[doc = "Command is not supported (unknown)."]
3198    MAV_RESULT_UNSUPPORTED = 3,
3199    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3200    MAV_RESULT_FAILED = 4,
3201    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3202    MAV_RESULT_IN_PROGRESS = 5,
3203    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3204    MAV_RESULT_CANCELLED = 6,
3205    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3206    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3207    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3208    MAV_RESULT_COMMAND_INT_ONLY = 8,
3209    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3210    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3211}
3212impl MavResult {
3213    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3214}
3215impl Default for MavResult {
3216    fn default() -> Self {
3217        Self::DEFAULT
3218    }
3219}
3220#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3222#[cfg_attr(feature = "serde", serde(tag = "type"))]
3223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3224#[repr(u32)]
3225#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3226#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3227pub enum MavRoi {
3228    #[doc = "No region of interest."]
3229    MAV_ROI_NONE = 0,
3230    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3231    MAV_ROI_WPNEXT = 1,
3232    #[doc = "Point toward given waypoint."]
3233    MAV_ROI_WPINDEX = 2,
3234    #[doc = "Point toward fixed location."]
3235    MAV_ROI_LOCATION = 3,
3236    #[doc = "Point toward of given id."]
3237    MAV_ROI_TARGET = 4,
3238}
3239impl MavRoi {
3240    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3241}
3242impl Default for MavRoi {
3243    fn default() -> Self {
3244        Self::DEFAULT
3245    }
3246}
3247#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3249#[cfg_attr(feature = "serde", serde(tag = "type"))]
3250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3251#[repr(u32)]
3252#[doc = "Enumeration of sensor orientation, according to its rotations"]
3253pub enum MavSensorOrientation {
3254    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3255    MAV_SENSOR_ROTATION_NONE = 0,
3256    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3257    MAV_SENSOR_ROTATION_YAW_45 = 1,
3258    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3259    MAV_SENSOR_ROTATION_YAW_90 = 2,
3260    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3261    MAV_SENSOR_ROTATION_YAW_135 = 3,
3262    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3263    MAV_SENSOR_ROTATION_YAW_180 = 4,
3264    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3265    MAV_SENSOR_ROTATION_YAW_225 = 5,
3266    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3267    MAV_SENSOR_ROTATION_YAW_270 = 6,
3268    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3269    MAV_SENSOR_ROTATION_YAW_315 = 7,
3270    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3272    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3273    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3274    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3276    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3277    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3278    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3279    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3280    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3281    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3282    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3283    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3284    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3285    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3286    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3288    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3289    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3290    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3291    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3292    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3293    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3294    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3295    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3296    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3297    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3298    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3299    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3300    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3301    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3302    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3303    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3304    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3305    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3306    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3307    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3308    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3309    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3310    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3311    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3312    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3313    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3314    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3315    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3316    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3317    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3318    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3319    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3320    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3321    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3322    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3323    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3324    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3325    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3326    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3327    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3328    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3329    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3330    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3331    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3332    #[doc = "Pitch: 315"]
3333    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3334    #[doc = "Roll: 90, Pitch: 315"]
3335    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3336    #[doc = "Custom orientation"]
3337    MAV_SENSOR_ROTATION_CUSTOM = 100,
3338}
3339impl MavSensorOrientation {
3340    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3341}
3342impl Default for MavSensorOrientation {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3353pub enum MavSeverity {
3354    #[doc = "System is unusable. This is a \"panic\" condition."]
3355    MAV_SEVERITY_EMERGENCY = 0,
3356    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3357    MAV_SEVERITY_ALERT = 1,
3358    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3359    MAV_SEVERITY_CRITICAL = 2,
3360    #[doc = "Indicates an error in secondary/redundant systems."]
3361    MAV_SEVERITY_ERROR = 3,
3362    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3363    MAV_SEVERITY_WARNING = 4,
3364    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3365    MAV_SEVERITY_NOTICE = 5,
3366    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3367    MAV_SEVERITY_INFO = 6,
3368    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3369    MAV_SEVERITY_DEBUG = 7,
3370}
3371impl MavSeverity {
3372    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3373}
3374impl Default for MavSeverity {
3375    fn default() -> Self {
3376        Self::DEFAULT
3377    }
3378}
3379#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3381#[cfg_attr(feature = "serde", serde(tag = "type"))]
3382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3383#[repr(u32)]
3384#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3385pub enum MavStandardMode {
3386    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3387    MAV_STANDARD_MODE_NON_STANDARD = 0,
3388    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3389    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3390    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3391    MAV_STANDARD_MODE_ORBIT = 2,
3392    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3393    MAV_STANDARD_MODE_CRUISE = 3,
3394    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3395    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3396    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3397    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3398    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3399    MAV_STANDARD_MODE_MISSION = 6,
3400    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3401    MAV_STANDARD_MODE_LAND = 7,
3402    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3403    MAV_STANDARD_MODE_TAKEOFF = 8,
3404}
3405impl MavStandardMode {
3406    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3407}
3408impl Default for MavStandardMode {
3409    fn default() -> Self {
3410        Self::DEFAULT
3411    }
3412}
3413#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3414#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3415#[cfg_attr(feature = "serde", serde(tag = "type"))]
3416#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3417#[repr(u32)]
3418pub enum MavState {
3419    #[doc = "Uninitialized system, state is unknown."]
3420    MAV_STATE_UNINIT = 0,
3421    #[doc = "System is booting up."]
3422    MAV_STATE_BOOT = 1,
3423    #[doc = "System is calibrating and not flight-ready."]
3424    MAV_STATE_CALIBRATING = 2,
3425    #[doc = "System is grounded and on standby. It can be launched any time."]
3426    MAV_STATE_STANDBY = 3,
3427    #[doc = "System is active and might be already airborne. Motors are engaged."]
3428    MAV_STATE_ACTIVE = 4,
3429    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3430    MAV_STATE_CRITICAL = 5,
3431    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3432    MAV_STATE_EMERGENCY = 6,
3433    #[doc = "System just initialized its power-down sequence, will shut down now."]
3434    MAV_STATE_POWEROFF = 7,
3435    #[doc = "System is terminating itself (failsafe or commanded)."]
3436    MAV_STATE_FLIGHT_TERMINATION = 8,
3437}
3438impl MavState {
3439    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3440}
3441impl Default for MavState {
3442    fn default() -> Self {
3443        Self::DEFAULT
3444    }
3445}
3446bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3447impl MavSysStatusSensor {
3448    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3449}
3450impl Default for MavSysStatusSensor {
3451    fn default() -> Self {
3452        Self::DEFAULT
3453    }
3454}
3455bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3456impl MavSysStatusSensorExtended {
3457    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3458}
3459impl Default for MavSysStatusSensorExtended {
3460    fn default() -> Self {
3461        Self::DEFAULT
3462    }
3463}
3464#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3465#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3466#[cfg_attr(feature = "serde", serde(tag = "type"))]
3467#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3468#[repr(u32)]
3469pub enum MavTunnelPayloadType {
3470    #[doc = "Encoding of payload unknown."]
3471    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3472    #[doc = "Registered for STorM32 gimbal controller."]
3473    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3474    #[doc = "Registered for STorM32 gimbal controller."]
3475    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3476    #[doc = "Registered for STorM32 gimbal controller."]
3477    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3478    #[doc = "Registered for STorM32 gimbal controller."]
3479    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3480    #[doc = "Registered for STorM32 gimbal controller."]
3481    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3482    #[doc = "Registered for STorM32 gimbal controller."]
3483    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3484    #[doc = "Registered for STorM32 gimbal controller."]
3485    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3486    #[doc = "Registered for STorM32 gimbal controller."]
3487    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3488    #[doc = "Registered for STorM32 gimbal controller."]
3489    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3490    #[doc = "Registered for STorM32 gimbal controller."]
3491    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3492    #[doc = "Registered for ModalAI remote OSD protocol."]
3493    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3494    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3495    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3496    #[doc = "Registered for ModalAI vendor use."]
3497    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3498}
3499impl MavTunnelPayloadType {
3500    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3501}
3502impl Default for MavTunnelPayloadType {
3503    fn default() -> Self {
3504        Self::DEFAULT
3505    }
3506}
3507#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3509#[cfg_attr(feature = "serde", serde(tag = "type"))]
3510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3511#[repr(u32)]
3512#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3513pub enum MavType {
3514    #[doc = "Generic micro air vehicle"]
3515    MAV_TYPE_GENERIC = 0,
3516    #[doc = "Fixed wing aircraft."]
3517    MAV_TYPE_FIXED_WING = 1,
3518    #[doc = "Quadrotor"]
3519    MAV_TYPE_QUADROTOR = 2,
3520    #[doc = "Coaxial helicopter"]
3521    MAV_TYPE_COAXIAL = 3,
3522    #[doc = "Normal helicopter with tail rotor."]
3523    MAV_TYPE_HELICOPTER = 4,
3524    #[doc = "Ground installation"]
3525    MAV_TYPE_ANTENNA_TRACKER = 5,
3526    #[doc = "Operator control unit / ground control station"]
3527    MAV_TYPE_GCS = 6,
3528    #[doc = "Airship, controlled"]
3529    MAV_TYPE_AIRSHIP = 7,
3530    #[doc = "Free balloon, uncontrolled"]
3531    MAV_TYPE_FREE_BALLOON = 8,
3532    #[doc = "Rocket"]
3533    MAV_TYPE_ROCKET = 9,
3534    #[doc = "Ground rover"]
3535    MAV_TYPE_GROUND_ROVER = 10,
3536    #[doc = "Surface vessel, boat, ship"]
3537    MAV_TYPE_SURFACE_BOAT = 11,
3538    #[doc = "Submarine"]
3539    MAV_TYPE_SUBMARINE = 12,
3540    #[doc = "Hexarotor"]
3541    MAV_TYPE_HEXAROTOR = 13,
3542    #[doc = "Octorotor"]
3543    MAV_TYPE_OCTOROTOR = 14,
3544    #[doc = "Tricopter"]
3545    MAV_TYPE_TRICOPTER = 15,
3546    #[doc = "Flapping wing"]
3547    MAV_TYPE_FLAPPING_WING = 16,
3548    #[doc = "Kite"]
3549    MAV_TYPE_KITE = 17,
3550    #[doc = "Onboard companion controller"]
3551    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3552    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3553    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3554    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3555    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3556    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3557    MAV_TYPE_VTOL_TILTROTOR = 21,
3558    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3559    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3560    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3561    MAV_TYPE_VTOL_TAILSITTER = 23,
3562    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3563    MAV_TYPE_VTOL_TILTWING = 24,
3564    #[doc = "VTOL reserved 5"]
3565    MAV_TYPE_VTOL_RESERVED5 = 25,
3566    #[doc = "Gimbal"]
3567    MAV_TYPE_GIMBAL = 26,
3568    #[doc = "ADSB system"]
3569    MAV_TYPE_ADSB = 27,
3570    #[doc = "Steerable, nonrigid airfoil"]
3571    MAV_TYPE_PARAFOIL = 28,
3572    #[doc = "Dodecarotor"]
3573    MAV_TYPE_DODECAROTOR = 29,
3574    #[doc = "Camera"]
3575    MAV_TYPE_CAMERA = 30,
3576    #[doc = "Charging station"]
3577    MAV_TYPE_CHARGING_STATION = 31,
3578    #[doc = "FLARM collision avoidance system"]
3579    MAV_TYPE_FLARM = 32,
3580    #[doc = "Servo"]
3581    MAV_TYPE_SERVO = 33,
3582    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3583    MAV_TYPE_ODID = 34,
3584    #[doc = "Decarotor"]
3585    MAV_TYPE_DECAROTOR = 35,
3586    #[doc = "Battery"]
3587    MAV_TYPE_BATTERY = 36,
3588    #[doc = "Parachute"]
3589    MAV_TYPE_PARACHUTE = 37,
3590    #[doc = "Log"]
3591    MAV_TYPE_LOG = 38,
3592    #[doc = "OSD"]
3593    MAV_TYPE_OSD = 39,
3594    #[doc = "IMU"]
3595    MAV_TYPE_IMU = 40,
3596    #[doc = "GPS"]
3597    MAV_TYPE_GPS = 41,
3598    #[doc = "Winch"]
3599    MAV_TYPE_WINCH = 42,
3600    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3601    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3602    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3603    MAV_TYPE_ILLUMINATOR = 44,
3604    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3605    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3606}
3607impl MavType {
3608    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3609}
3610impl Default for MavType {
3611    fn default() -> Self {
3612        Self::DEFAULT
3613    }
3614}
3615#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3617#[cfg_attr(feature = "serde", serde(tag = "type"))]
3618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3619#[repr(u32)]
3620#[doc = "Enumeration of VTOL states"]
3621pub enum MavVtolState {
3622    #[doc = "MAV is not configured as VTOL"]
3623    MAV_VTOL_STATE_UNDEFINED = 0,
3624    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3625    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3626    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3627    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3628    #[doc = "VTOL is in multicopter state"]
3629    MAV_VTOL_STATE_MC = 3,
3630    #[doc = "VTOL is in fixed-wing state"]
3631    MAV_VTOL_STATE_FW = 4,
3632}
3633impl MavVtolState {
3634    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3635}
3636impl Default for MavVtolState {
3637    fn default() -> Self {
3638        Self::DEFAULT
3639    }
3640}
3641bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3642impl MavWinchStatusFlag {
3643    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3644}
3645impl Default for MavWinchStatusFlag {
3646    fn default() -> Self {
3647        Self::DEFAULT
3648    }
3649}
3650#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3652#[cfg_attr(feature = "serde", serde(tag = "type"))]
3653#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3654#[repr(u32)]
3655pub enum MavlinkDataStreamType {
3656    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3657    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3658    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3659    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3660    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3661    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3662}
3663impl MavlinkDataStreamType {
3664    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3665}
3666impl Default for MavlinkDataStreamType {
3667    fn default() -> Self {
3668        Self::DEFAULT
3669    }
3670}
3671#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3673#[cfg_attr(feature = "serde", serde(tag = "type"))]
3674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3675#[repr(u32)]
3676#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3677pub enum MissionState {
3678    #[doc = "The mission status reporting is not supported."]
3679    MISSION_STATE_UNKNOWN = 0,
3680    #[doc = "No mission on the vehicle."]
3681    MISSION_STATE_NO_MISSION = 1,
3682    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3683    MISSION_STATE_NOT_STARTED = 2,
3684    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3685    MISSION_STATE_ACTIVE = 3,
3686    #[doc = "Mission is paused when in auto mode."]
3687    MISSION_STATE_PAUSED = 4,
3688    #[doc = "Mission has executed all mission items."]
3689    MISSION_STATE_COMPLETE = 5,
3690}
3691impl MissionState {
3692    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3693}
3694impl Default for MissionState {
3695    fn default() -> Self {
3696        Self::DEFAULT
3697    }
3698}
3699#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3700#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3701#[cfg_attr(feature = "serde", serde(tag = "type"))]
3702#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3703#[repr(u32)]
3704#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3705pub enum MotorTestOrder {
3706    #[doc = "Default autopilot motor test method."]
3707    MOTOR_TEST_ORDER_DEFAULT = 0,
3708    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3709    MOTOR_TEST_ORDER_SEQUENCE = 1,
3710    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3711    MOTOR_TEST_ORDER_BOARD = 2,
3712}
3713impl MotorTestOrder {
3714    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3715}
3716impl Default for MotorTestOrder {
3717    fn default() -> Self {
3718        Self::DEFAULT
3719    }
3720}
3721#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3723#[cfg_attr(feature = "serde", serde(tag = "type"))]
3724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3725#[repr(u32)]
3726#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3727pub enum MotorTestThrottleType {
3728    #[doc = "Throttle as a percentage (0 ~ 100)"]
3729    MOTOR_TEST_THROTTLE_PERCENT = 0,
3730    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3731    MOTOR_TEST_THROTTLE_PWM = 1,
3732    #[doc = "Throttle pass-through from pilot's transmitter."]
3733    MOTOR_TEST_THROTTLE_PILOT = 2,
3734    #[doc = "Per-motor compass calibration test."]
3735    MOTOR_TEST_COMPASS_CAL = 3,
3736}
3737impl MotorTestThrottleType {
3738    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3739}
3740impl Default for MotorTestThrottleType {
3741    fn default() -> Self {
3742        Self::DEFAULT
3743    }
3744}
3745#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3747#[cfg_attr(feature = "serde", serde(tag = "type"))]
3748#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3749#[repr(u32)]
3750pub enum NavVtolLandOptions {
3751    #[doc = "Default autopilot landing behaviour."]
3752    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3753    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3754    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3755    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3756    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3757}
3758impl NavVtolLandOptions {
3759    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3760}
3761impl Default for NavVtolLandOptions {
3762    fn default() -> Self {
3763        Self::DEFAULT
3764    }
3765}
3766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3768#[cfg_attr(feature = "serde", serde(tag = "type"))]
3769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3770#[repr(u32)]
3771#[doc = "Yaw behaviour during orbit flight."]
3772pub enum OrbitYawBehaviour {
3773    #[doc = "Vehicle front points to the center (default)."]
3774    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3775    #[doc = "Vehicle front holds heading when message received."]
3776    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3777    #[doc = "Yaw uncontrolled."]
3778    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3779    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3780    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3781    #[doc = "Yaw controlled by RC input."]
3782    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3783    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3784    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3785}
3786impl OrbitYawBehaviour {
3787    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3788}
3789impl Default for OrbitYawBehaviour {
3790    fn default() -> Self {
3791        Self::DEFAULT
3792    }
3793}
3794#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3795#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3796#[cfg_attr(feature = "serde", serde(tag = "type"))]
3797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3798#[repr(u32)]
3799#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3800pub enum ParachuteAction {
3801    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3802    PARACHUTE_DISABLE = 0,
3803    #[doc = "Enable auto-release of parachute."]
3804    PARACHUTE_ENABLE = 1,
3805    #[doc = "Release parachute and kill motors."]
3806    PARACHUTE_RELEASE = 2,
3807}
3808impl ParachuteAction {
3809    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3810}
3811impl Default for ParachuteAction {
3812    fn default() -> Self {
3813        Self::DEFAULT
3814    }
3815}
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "Result from PARAM_EXT_SET message."]
3822pub enum ParamAck {
3823    #[doc = "Parameter value ACCEPTED and SET"]
3824    PARAM_ACK_ACCEPTED = 0,
3825    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3826    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3827    #[doc = "Parameter failed to set"]
3828    PARAM_ACK_FAILED = 2,
3829    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3830    PARAM_ACK_IN_PROGRESS = 3,
3831}
3832impl ParamAck {
3833    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3834}
3835impl Default for ParamAck {
3836    fn default() -> Self {
3837        Self::DEFAULT
3838    }
3839}
3840bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3841impl PositionTargetTypemask {
3842    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3843}
3844impl Default for PositionTargetTypemask {
3845    fn default() -> Self {
3846        Self::DEFAULT
3847    }
3848}
3849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3851#[cfg_attr(feature = "serde", serde(tag = "type"))]
3852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3853#[repr(u32)]
3854#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3855pub enum PrecisionLandMode {
3856    #[doc = "Normal (non-precision) landing."]
3857    PRECISION_LAND_MODE_DISABLED = 0,
3858    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3859    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3860    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3861    PRECISION_LAND_MODE_REQUIRED = 2,
3862}
3863impl PrecisionLandMode {
3864    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3865}
3866impl Default for PrecisionLandMode {
3867    fn default() -> Self {
3868        Self::DEFAULT
3869    }
3870}
3871#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3873#[cfg_attr(feature = "serde", serde(tag = "type"))]
3874#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3875#[repr(u32)]
3876#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3877pub enum PreflightStorageMissionAction {
3878    #[doc = "Read current mission data from persistent storage"]
3879    MISSION_READ_PERSISTENT = 0,
3880    #[doc = "Write current mission data to persistent storage"]
3881    MISSION_WRITE_PERSISTENT = 1,
3882    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3883    MISSION_RESET_DEFAULT = 2,
3884}
3885impl PreflightStorageMissionAction {
3886    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3887}
3888impl Default for PreflightStorageMissionAction {
3889    fn default() -> Self {
3890        Self::DEFAULT
3891    }
3892}
3893#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3894#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3895#[cfg_attr(feature = "serde", serde(tag = "type"))]
3896#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3897#[repr(u32)]
3898#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3899pub enum PreflightStorageParameterAction {
3900    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3901    PARAM_READ_PERSISTENT = 0,
3902    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3903    PARAM_WRITE_PERSISTENT = 1,
3904    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3905    PARAM_RESET_CONFIG_DEFAULT = 2,
3906    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3907    PARAM_RESET_SENSOR_DEFAULT = 3,
3908    #[doc = "Reset all parameters, including operation counters, to default values"]
3909    PARAM_RESET_ALL_DEFAULT = 4,
3910}
3911impl PreflightStorageParameterAction {
3912    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3913}
3914impl Default for PreflightStorageParameterAction {
3915    fn default() -> Self {
3916        Self::DEFAULT
3917    }
3918}
3919#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3921#[cfg_attr(feature = "serde", serde(tag = "type"))]
3922#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3923#[repr(u32)]
3924#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3925pub enum RcSubType {
3926    #[doc = "Spektrum DSM2"]
3927    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3928    #[doc = "Spektrum DSMX"]
3929    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3930    #[doc = "Spektrum DSMX8"]
3931    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3932}
3933impl RcSubType {
3934    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3935}
3936impl Default for RcSubType {
3937    fn default() -> Self {
3938        Self::DEFAULT
3939    }
3940}
3941#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3943#[cfg_attr(feature = "serde", serde(tag = "type"))]
3944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3945#[repr(u32)]
3946#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3947pub enum RcType {
3948    #[doc = "Spektrum"]
3949    RC_TYPE_SPEKTRUM = 0,
3950    #[doc = "CRSF"]
3951    RC_TYPE_CRSF = 1,
3952}
3953impl RcType {
3954    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3955}
3956impl Default for RcType {
3957    fn default() -> Self {
3958        Self::DEFAULT
3959    }
3960}
3961#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3963#[cfg_attr(feature = "serde", serde(tag = "type"))]
3964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3965#[repr(u32)]
3966#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3967pub enum RebootShutdownConditions {
3968    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3969    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3970    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3971    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3972}
3973impl RebootShutdownConditions {
3974    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3975}
3976impl Default for RebootShutdownConditions {
3977    fn default() -> Self {
3978        Self::DEFAULT
3979    }
3980}
3981#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3983#[cfg_attr(feature = "serde", serde(tag = "type"))]
3984#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3985#[repr(u32)]
3986#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3987pub enum RtkBaselineCoordinateSystem {
3988    #[doc = "Earth-centered, Earth-fixed"]
3989    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3990    #[doc = "RTK basestation centered, north, east, down"]
3991    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3992}
3993impl RtkBaselineCoordinateSystem {
3994    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3995}
3996impl Default for RtkBaselineCoordinateSystem {
3997    fn default() -> Self {
3998        Self::DEFAULT
3999    }
4000}
4001#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4003#[cfg_attr(feature = "serde", serde(tag = "type"))]
4004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4005#[repr(u32)]
4006#[doc = "Possible safety switch states."]
4007pub enum SafetySwitchState {
4008    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
4009    SAFETY_SWITCH_STATE_SAFE = 0,
4010    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
4011    SAFETY_SWITCH_STATE_DANGEROUS = 1,
4012}
4013impl SafetySwitchState {
4014    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
4015}
4016impl Default for SafetySwitchState {
4017    fn default() -> Self {
4018        Self::DEFAULT
4019    }
4020}
4021#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4023#[cfg_attr(feature = "serde", serde(tag = "type"))]
4024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4025#[repr(u32)]
4026#[doc = "SERIAL_CONTROL device types"]
4027pub enum SerialControlDev {
4028    #[doc = "First telemetry port"]
4029    SERIAL_CONTROL_DEV_TELEM1 = 0,
4030    #[doc = "Second telemetry port"]
4031    SERIAL_CONTROL_DEV_TELEM2 = 1,
4032    #[doc = "First GPS port"]
4033    SERIAL_CONTROL_DEV_GPS1 = 2,
4034    #[doc = "Second GPS port"]
4035    SERIAL_CONTROL_DEV_GPS2 = 3,
4036    #[doc = "system shell"]
4037    SERIAL_CONTROL_DEV_SHELL = 10,
4038    #[doc = "SERIAL0"]
4039    SERIAL_CONTROL_SERIAL0 = 100,
4040    #[doc = "SERIAL1"]
4041    SERIAL_CONTROL_SERIAL1 = 101,
4042    #[doc = "SERIAL2"]
4043    SERIAL_CONTROL_SERIAL2 = 102,
4044    #[doc = "SERIAL3"]
4045    SERIAL_CONTROL_SERIAL3 = 103,
4046    #[doc = "SERIAL4"]
4047    SERIAL_CONTROL_SERIAL4 = 104,
4048    #[doc = "SERIAL5"]
4049    SERIAL_CONTROL_SERIAL5 = 105,
4050    #[doc = "SERIAL6"]
4051    SERIAL_CONTROL_SERIAL6 = 106,
4052    #[doc = "SERIAL7"]
4053    SERIAL_CONTROL_SERIAL7 = 107,
4054    #[doc = "SERIAL8"]
4055    SERIAL_CONTROL_SERIAL8 = 108,
4056    #[doc = "SERIAL9"]
4057    SERIAL_CONTROL_SERIAL9 = 109,
4058}
4059impl SerialControlDev {
4060    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4061}
4062impl Default for SerialControlDev {
4063    fn default() -> Self {
4064        Self::DEFAULT
4065    }
4066}
4067bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4068impl SerialControlFlag {
4069    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4070}
4071impl Default for SerialControlFlag {
4072    fn default() -> Self {
4073        Self::DEFAULT
4074    }
4075}
4076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4078#[cfg_attr(feature = "serde", serde(tag = "type"))]
4079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4080#[repr(u32)]
4081#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4082pub enum SetFocusType {
4083    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4084    FOCUS_TYPE_STEP = 0,
4085    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4086    FOCUS_TYPE_CONTINUOUS = 1,
4087    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4088    FOCUS_TYPE_RANGE = 2,
4089    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4090    FOCUS_TYPE_METERS = 3,
4091    #[doc = "Focus automatically."]
4092    FOCUS_TYPE_AUTO = 4,
4093    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4094    FOCUS_TYPE_AUTO_SINGLE = 5,
4095    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4096    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4097}
4098impl SetFocusType {
4099    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4100}
4101impl Default for SetFocusType {
4102    fn default() -> Self {
4103        Self::DEFAULT
4104    }
4105}
4106#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4107#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4108#[cfg_attr(feature = "serde", serde(tag = "type"))]
4109#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4110#[repr(u32)]
4111#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4112pub enum SpeedType {
4113    #[doc = "Airspeed"]
4114    SPEED_TYPE_AIRSPEED = 0,
4115    #[doc = "Groundspeed"]
4116    SPEED_TYPE_GROUNDSPEED = 1,
4117    #[doc = "Climb speed"]
4118    SPEED_TYPE_CLIMB_SPEED = 2,
4119    #[doc = "Descent speed"]
4120    SPEED_TYPE_DESCENT_SPEED = 3,
4121}
4122impl SpeedType {
4123    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4124}
4125impl Default for SpeedType {
4126    fn default() -> Self {
4127        Self::DEFAULT
4128    }
4129}
4130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4132#[cfg_attr(feature = "serde", serde(tag = "type"))]
4133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4134#[repr(u32)]
4135#[doc = "Flags to indicate the status of camera storage."]
4136pub enum StorageStatus {
4137    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4138    STORAGE_STATUS_EMPTY = 0,
4139    #[doc = "Storage present but unformatted."]
4140    STORAGE_STATUS_UNFORMATTED = 1,
4141    #[doc = "Storage present and ready."]
4142    STORAGE_STATUS_READY = 2,
4143    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4144    STORAGE_STATUS_NOT_SUPPORTED = 3,
4145}
4146impl StorageStatus {
4147    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4148}
4149impl Default for StorageStatus {
4150    fn default() -> Self {
4151        Self::DEFAULT
4152    }
4153}
4154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4156#[cfg_attr(feature = "serde", serde(tag = "type"))]
4157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4158#[repr(u32)]
4159#[doc = "Flags to indicate the type of storage."]
4160pub enum StorageType {
4161    #[doc = "Storage type is not known."]
4162    STORAGE_TYPE_UNKNOWN = 0,
4163    #[doc = "Storage type is USB device."]
4164    STORAGE_TYPE_USB_STICK = 1,
4165    #[doc = "Storage type is SD card."]
4166    STORAGE_TYPE_SD = 2,
4167    #[doc = "Storage type is microSD card."]
4168    STORAGE_TYPE_MICROSD = 3,
4169    #[doc = "Storage type is CFast."]
4170    STORAGE_TYPE_CF = 4,
4171    #[doc = "Storage type is CFexpress."]
4172    STORAGE_TYPE_CFE = 5,
4173    #[doc = "Storage type is XQD."]
4174    STORAGE_TYPE_XQD = 6,
4175    #[doc = "Storage type is HD mass storage type."]
4176    STORAGE_TYPE_HD = 7,
4177    #[doc = "Storage type is other, not listed type."]
4178    STORAGE_TYPE_OTHER = 254,
4179}
4180impl StorageType {
4181    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4182}
4183impl Default for StorageType {
4184    fn default() -> Self {
4185        Self::DEFAULT
4186    }
4187}
4188bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4189impl StorageUsageFlag {
4190    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4191}
4192impl Default for StorageUsageFlag {
4193    fn default() -> Self {
4194        Self::DEFAULT
4195    }
4196}
4197#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4199#[cfg_attr(feature = "serde", serde(tag = "type"))]
4200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4201#[repr(u32)]
4202#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4203pub enum TuneFormat {
4204    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4205    TUNE_FORMAT_QBASIC1_1 = 1,
4206    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4207    TUNE_FORMAT_MML_MODERN = 2,
4208}
4209impl TuneFormat {
4210    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4211}
4212impl Default for TuneFormat {
4213    fn default() -> Self {
4214        Self::DEFAULT
4215    }
4216}
4217#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4218#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4219#[cfg_attr(feature = "serde", serde(tag = "type"))]
4220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4221#[repr(u32)]
4222#[doc = "Generalized UAVCAN node health"]
4223pub enum UavcanNodeHealth {
4224    #[doc = "The node is functioning properly."]
4225    UAVCAN_NODE_HEALTH_OK = 0,
4226    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4227    UAVCAN_NODE_HEALTH_WARNING = 1,
4228    #[doc = "The node has encountered a major failure."]
4229    UAVCAN_NODE_HEALTH_ERROR = 2,
4230    #[doc = "The node has suffered a fatal malfunction."]
4231    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4232}
4233impl UavcanNodeHealth {
4234    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4235}
4236impl Default for UavcanNodeHealth {
4237    fn default() -> Self {
4238        Self::DEFAULT
4239    }
4240}
4241#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4242#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4243#[cfg_attr(feature = "serde", serde(tag = "type"))]
4244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4245#[repr(u32)]
4246#[doc = "Generalized UAVCAN node mode"]
4247pub enum UavcanNodeMode {
4248    #[doc = "The node is performing its primary functions."]
4249    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4250    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4251    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4252    #[doc = "The node is under maintenance."]
4253    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4254    #[doc = "The node is in the process of updating its software."]
4255    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4256    #[doc = "The node is no longer available online."]
4257    UAVCAN_NODE_MODE_OFFLINE = 7,
4258}
4259impl UavcanNodeMode {
4260    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4261}
4262impl Default for UavcanNodeMode {
4263    fn default() -> Self {
4264        Self::DEFAULT
4265    }
4266}
4267bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4268impl UtmDataAvailFlags {
4269    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4270}
4271impl Default for UtmDataAvailFlags {
4272    fn default() -> Self {
4273        Self::DEFAULT
4274    }
4275}
4276#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4277#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4278#[cfg_attr(feature = "serde", serde(tag = "type"))]
4279#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4280#[repr(u32)]
4281#[doc = "Airborne status of UAS."]
4282pub enum UtmFlightState {
4283    #[doc = "The flight state can't be determined."]
4284    UTM_FLIGHT_STATE_UNKNOWN = 1,
4285    #[doc = "UAS on ground."]
4286    UTM_FLIGHT_STATE_GROUND = 2,
4287    #[doc = "UAS airborne."]
4288    UTM_FLIGHT_STATE_AIRBORNE = 3,
4289    #[doc = "UAS is in an emergency flight state."]
4290    UTM_FLIGHT_STATE_EMERGENCY = 16,
4291    #[doc = "UAS has no active controls."]
4292    UTM_FLIGHT_STATE_NOCTRL = 32,
4293}
4294impl UtmFlightState {
4295    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4296}
4297impl Default for UtmFlightState {
4298    fn default() -> Self {
4299        Self::DEFAULT
4300    }
4301}
4302#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4303#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4304#[cfg_attr(feature = "serde", serde(tag = "type"))]
4305#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4306#[repr(u32)]
4307#[doc = "Video stream encodings"]
4308pub enum VideoStreamEncoding {
4309    #[doc = "Stream encoding is unknown"]
4310    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4311    #[doc = "Stream encoding is H.264"]
4312    VIDEO_STREAM_ENCODING_H264 = 1,
4313    #[doc = "Stream encoding is H.265"]
4314    VIDEO_STREAM_ENCODING_H265 = 2,
4315}
4316impl VideoStreamEncoding {
4317    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4318}
4319impl Default for VideoStreamEncoding {
4320    fn default() -> Self {
4321        Self::DEFAULT
4322    }
4323}
4324bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4325impl VideoStreamStatusFlags {
4326    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4327}
4328impl Default for VideoStreamStatusFlags {
4329    fn default() -> Self {
4330        Self::DEFAULT
4331    }
4332}
4333#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4335#[cfg_attr(feature = "serde", serde(tag = "type"))]
4336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4337#[repr(u32)]
4338#[doc = "Video stream types"]
4339pub enum VideoStreamType {
4340    #[doc = "Stream is RTSP"]
4341    VIDEO_STREAM_TYPE_RTSP = 0,
4342    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4343    VIDEO_STREAM_TYPE_RTPUDP = 1,
4344    #[doc = "Stream is MPEG on TCP"]
4345    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4346    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4347    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4348}
4349impl VideoStreamType {
4350    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4351}
4352impl Default for VideoStreamType {
4353    fn default() -> Self {
4354        Self::DEFAULT
4355    }
4356}
4357#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4359#[cfg_attr(feature = "serde", serde(tag = "type"))]
4360#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4361#[repr(u32)]
4362#[doc = "Direction of VTOL transition"]
4363pub enum VtolTransitionHeading {
4364    #[doc = "Respect the heading configuration of the vehicle."]
4365    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4366    #[doc = "Use the heading pointing towards the next waypoint."]
4367    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4368    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4369    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4370    #[doc = "Use the specified heading in parameter 4."]
4371    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4372    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4373    VTOL_TRANSITION_HEADING_ANY = 4,
4374}
4375impl VtolTransitionHeading {
4376    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4377}
4378impl Default for VtolTransitionHeading {
4379    fn default() -> Self {
4380        Self::DEFAULT
4381    }
4382}
4383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4385#[cfg_attr(feature = "serde", serde(tag = "type"))]
4386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4387#[repr(u32)]
4388#[doc = "WiFi Mode."]
4389pub enum WifiConfigApMode {
4390    #[doc = "WiFi mode is undefined."]
4391    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4392    #[doc = "WiFi configured as an access point."]
4393    WIFI_CONFIG_AP_MODE_AP = 1,
4394    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4395    WIFI_CONFIG_AP_MODE_STATION = 2,
4396    #[doc = "WiFi disabled."]
4397    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4398}
4399impl WifiConfigApMode {
4400    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4401}
4402impl Default for WifiConfigApMode {
4403    fn default() -> Self {
4404        Self::DEFAULT
4405    }
4406}
4407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4409#[cfg_attr(feature = "serde", serde(tag = "type"))]
4410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4411#[repr(u32)]
4412#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4413pub enum WifiConfigApResponse {
4414    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4415    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4416    #[doc = "Changes accepted."]
4417    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4418    #[doc = "Changes rejected."]
4419    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4420    #[doc = "Invalid Mode."]
4421    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4422    #[doc = "Invalid SSID."]
4423    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4424    #[doc = "Invalid Password."]
4425    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4426}
4427impl WifiConfigApResponse {
4428    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4429}
4430impl Default for WifiConfigApResponse {
4431    fn default() -> Self {
4432        Self::DEFAULT
4433    }
4434}
4435#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4436#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4437#[cfg_attr(feature = "serde", serde(tag = "type"))]
4438#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4439#[repr(u32)]
4440#[doc = "Winch actions."]
4441pub enum WinchActions {
4442    #[doc = "Allow motor to freewheel."]
4443    WINCH_RELAXED = 0,
4444    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4445    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4446    #[doc = "Wind or unwind line at specified rate."]
4447    WINCH_RATE_CONTROL = 2,
4448    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4449    WINCH_LOCK = 3,
4450    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4451    WINCH_DELIVER = 4,
4452    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4453    WINCH_HOLD = 5,
4454    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4455    WINCH_RETRACT = 6,
4456    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4457    WINCH_LOAD_LINE = 7,
4458    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4459    WINCH_ABANDON_LINE = 8,
4460    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4461    WINCH_LOAD_PAYLOAD = 9,
4462}
4463impl WinchActions {
4464    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4465}
4466impl Default for WinchActions {
4467    fn default() -> Self {
4468        Self::DEFAULT
4469    }
4470}
4471#[doc = "Set the vehicle attitude and body angular rates."]
4472#[doc = ""]
4473#[doc = "ID: 140"]
4474#[derive(Debug, Clone, PartialEq)]
4475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4476#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4477pub struct ACTUATOR_CONTROL_TARGET_DATA {
4478    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4479    pub time_usec: u64,
4480    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4481    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4482    pub controls: [f32; 8],
4483    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4484    pub group_mlx: u8,
4485}
4486impl ACTUATOR_CONTROL_TARGET_DATA {
4487    pub const ENCODED_LEN: usize = 41usize;
4488    pub const DEFAULT: Self = Self {
4489        time_usec: 0_u64,
4490        controls: [0.0_f32; 8usize],
4491        group_mlx: 0_u8,
4492    };
4493    #[cfg(feature = "arbitrary")]
4494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4495        use arbitrary::{Arbitrary, Unstructured};
4496        let mut buf = [0u8; 1024];
4497        rng.fill_bytes(&mut buf);
4498        let mut unstructured = Unstructured::new(&buf);
4499        Self::arbitrary(&mut unstructured).unwrap_or_default()
4500    }
4501}
4502impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4503    fn default() -> Self {
4504        Self::DEFAULT.clone()
4505    }
4506}
4507impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4508    type Message = MavMessage;
4509    const ID: u32 = 140u32;
4510    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4511    const EXTRA_CRC: u8 = 181u8;
4512    const ENCODED_LEN: usize = 41usize;
4513    fn deser(
4514        _version: MavlinkVersion,
4515        __input: &[u8],
4516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4517        let avail_len = __input.len();
4518        let mut payload_buf = [0; Self::ENCODED_LEN];
4519        let mut buf = if avail_len < Self::ENCODED_LEN {
4520            payload_buf[0..avail_len].copy_from_slice(__input);
4521            Bytes::new(&payload_buf)
4522        } else {
4523            Bytes::new(__input)
4524        };
4525        let mut __struct = Self::default();
4526        __struct.time_usec = buf.get_u64_le();
4527        for v in &mut __struct.controls {
4528            let val = buf.get_f32_le();
4529            *v = val;
4530        }
4531        __struct.group_mlx = buf.get_u8();
4532        Ok(__struct)
4533    }
4534    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4535        let mut __tmp = BytesMut::new(bytes);
4536        #[allow(clippy::absurd_extreme_comparisons)]
4537        #[allow(unused_comparisons)]
4538        if __tmp.remaining() < Self::ENCODED_LEN {
4539            panic!(
4540                "buffer is too small (need {} bytes, but got {})",
4541                Self::ENCODED_LEN,
4542                __tmp.remaining(),
4543            )
4544        }
4545        __tmp.put_u64_le(self.time_usec);
4546        for val in &self.controls {
4547            __tmp.put_f32_le(*val);
4548        }
4549        __tmp.put_u8(self.group_mlx);
4550        if matches!(version, MavlinkVersion::V2) {
4551            let len = __tmp.len();
4552            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4553        } else {
4554            __tmp.len()
4555        }
4556    }
4557}
4558#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4559#[doc = ""]
4560#[doc = "ID: 375"]
4561#[derive(Debug, Clone, PartialEq)]
4562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4564pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4565    #[doc = "Timestamp (since system boot)."]
4566    pub time_usec: u64,
4567    #[doc = "Active outputs"]
4568    pub active: u32,
4569    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4570    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4571    pub actuator: [f32; 32],
4572}
4573impl ACTUATOR_OUTPUT_STATUS_DATA {
4574    pub const ENCODED_LEN: usize = 140usize;
4575    pub const DEFAULT: Self = Self {
4576        time_usec: 0_u64,
4577        active: 0_u32,
4578        actuator: [0.0_f32; 32usize],
4579    };
4580    #[cfg(feature = "arbitrary")]
4581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4582        use arbitrary::{Arbitrary, Unstructured};
4583        let mut buf = [0u8; 1024];
4584        rng.fill_bytes(&mut buf);
4585        let mut unstructured = Unstructured::new(&buf);
4586        Self::arbitrary(&mut unstructured).unwrap_or_default()
4587    }
4588}
4589impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4590    fn default() -> Self {
4591        Self::DEFAULT.clone()
4592    }
4593}
4594impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4595    type Message = MavMessage;
4596    const ID: u32 = 375u32;
4597    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4598    const EXTRA_CRC: u8 = 251u8;
4599    const ENCODED_LEN: usize = 140usize;
4600    fn deser(
4601        _version: MavlinkVersion,
4602        __input: &[u8],
4603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4604        let avail_len = __input.len();
4605        let mut payload_buf = [0; Self::ENCODED_LEN];
4606        let mut buf = if avail_len < Self::ENCODED_LEN {
4607            payload_buf[0..avail_len].copy_from_slice(__input);
4608            Bytes::new(&payload_buf)
4609        } else {
4610            Bytes::new(__input)
4611        };
4612        let mut __struct = Self::default();
4613        __struct.time_usec = buf.get_u64_le();
4614        __struct.active = buf.get_u32_le();
4615        for v in &mut __struct.actuator {
4616            let val = buf.get_f32_le();
4617            *v = val;
4618        }
4619        Ok(__struct)
4620    }
4621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4622        let mut __tmp = BytesMut::new(bytes);
4623        #[allow(clippy::absurd_extreme_comparisons)]
4624        #[allow(unused_comparisons)]
4625        if __tmp.remaining() < Self::ENCODED_LEN {
4626            panic!(
4627                "buffer is too small (need {} bytes, but got {})",
4628                Self::ENCODED_LEN,
4629                __tmp.remaining(),
4630            )
4631        }
4632        __tmp.put_u64_le(self.time_usec);
4633        __tmp.put_u32_le(self.active);
4634        for val in &self.actuator {
4635            __tmp.put_f32_le(*val);
4636        }
4637        if matches!(version, MavlinkVersion::V2) {
4638            let len = __tmp.len();
4639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4640        } else {
4641            __tmp.len()
4642        }
4643    }
4644}
4645#[doc = "The location and information of an ADSB vehicle."]
4646#[doc = ""]
4647#[doc = "ID: 246"]
4648#[derive(Debug, Clone, PartialEq)]
4649#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4650#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4651pub struct ADSB_VEHICLE_DATA {
4652    #[doc = "ICAO address"]
4653    pub ICAO_address: u32,
4654    #[doc = "Latitude"]
4655    pub lat: i32,
4656    #[doc = "Longitude"]
4657    pub lon: i32,
4658    #[doc = "Altitude(ASL)"]
4659    pub altitude: i32,
4660    #[doc = "Course over ground"]
4661    pub heading: u16,
4662    #[doc = "The horizontal velocity"]
4663    pub hor_velocity: u16,
4664    #[doc = "The vertical velocity. Positive is up"]
4665    pub ver_velocity: i16,
4666    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4667    pub flags: AdsbFlags,
4668    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4669    pub squawk: u16,
4670    #[doc = "ADSB altitude type."]
4671    pub altitude_type: AdsbAltitudeType,
4672    #[doc = "The callsign, 8+null"]
4673    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4674    pub callsign: [u8; 9],
4675    #[doc = "ADSB emitter type."]
4676    pub emitter_type: AdsbEmitterType,
4677    #[doc = "Time since last communication in seconds"]
4678    pub tslc: u8,
4679}
4680impl ADSB_VEHICLE_DATA {
4681    pub const ENCODED_LEN: usize = 38usize;
4682    pub const DEFAULT: Self = Self {
4683        ICAO_address: 0_u32,
4684        lat: 0_i32,
4685        lon: 0_i32,
4686        altitude: 0_i32,
4687        heading: 0_u16,
4688        hor_velocity: 0_u16,
4689        ver_velocity: 0_i16,
4690        flags: AdsbFlags::DEFAULT,
4691        squawk: 0_u16,
4692        altitude_type: AdsbAltitudeType::DEFAULT,
4693        callsign: [0_u8; 9usize],
4694        emitter_type: AdsbEmitterType::DEFAULT,
4695        tslc: 0_u8,
4696    };
4697    #[cfg(feature = "arbitrary")]
4698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4699        use arbitrary::{Arbitrary, Unstructured};
4700        let mut buf = [0u8; 1024];
4701        rng.fill_bytes(&mut buf);
4702        let mut unstructured = Unstructured::new(&buf);
4703        Self::arbitrary(&mut unstructured).unwrap_or_default()
4704    }
4705}
4706impl Default for ADSB_VEHICLE_DATA {
4707    fn default() -> Self {
4708        Self::DEFAULT.clone()
4709    }
4710}
4711impl MessageData for ADSB_VEHICLE_DATA {
4712    type Message = MavMessage;
4713    const ID: u32 = 246u32;
4714    const NAME: &'static str = "ADSB_VEHICLE";
4715    const EXTRA_CRC: u8 = 184u8;
4716    const ENCODED_LEN: usize = 38usize;
4717    fn deser(
4718        _version: MavlinkVersion,
4719        __input: &[u8],
4720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4721        let avail_len = __input.len();
4722        let mut payload_buf = [0; Self::ENCODED_LEN];
4723        let mut buf = if avail_len < Self::ENCODED_LEN {
4724            payload_buf[0..avail_len].copy_from_slice(__input);
4725            Bytes::new(&payload_buf)
4726        } else {
4727            Bytes::new(__input)
4728        };
4729        let mut __struct = Self::default();
4730        __struct.ICAO_address = buf.get_u32_le();
4731        __struct.lat = buf.get_i32_le();
4732        __struct.lon = buf.get_i32_le();
4733        __struct.altitude = buf.get_i32_le();
4734        __struct.heading = buf.get_u16_le();
4735        __struct.hor_velocity = buf.get_u16_le();
4736        __struct.ver_velocity = buf.get_i16_le();
4737        let tmp = buf.get_u16_le();
4738        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4739            ::mavlink_core::error::ParserError::InvalidFlag {
4740                flag_type: "AdsbFlags",
4741                value: tmp as u32,
4742            },
4743        )?;
4744        __struct.squawk = buf.get_u16_le();
4745        let tmp = buf.get_u8();
4746        __struct.altitude_type =
4747            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4748                enum_type: "AdsbAltitudeType",
4749                value: tmp as u32,
4750            })?;
4751        for v in &mut __struct.callsign {
4752            let val = buf.get_u8();
4753            *v = val;
4754        }
4755        let tmp = buf.get_u8();
4756        __struct.emitter_type =
4757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4758                enum_type: "AdsbEmitterType",
4759                value: tmp as u32,
4760            })?;
4761        __struct.tslc = buf.get_u8();
4762        Ok(__struct)
4763    }
4764    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4765        let mut __tmp = BytesMut::new(bytes);
4766        #[allow(clippy::absurd_extreme_comparisons)]
4767        #[allow(unused_comparisons)]
4768        if __tmp.remaining() < Self::ENCODED_LEN {
4769            panic!(
4770                "buffer is too small (need {} bytes, but got {})",
4771                Self::ENCODED_LEN,
4772                __tmp.remaining(),
4773            )
4774        }
4775        __tmp.put_u32_le(self.ICAO_address);
4776        __tmp.put_i32_le(self.lat);
4777        __tmp.put_i32_le(self.lon);
4778        __tmp.put_i32_le(self.altitude);
4779        __tmp.put_u16_le(self.heading);
4780        __tmp.put_u16_le(self.hor_velocity);
4781        __tmp.put_i16_le(self.ver_velocity);
4782        __tmp.put_u16_le(self.flags.bits());
4783        __tmp.put_u16_le(self.squawk);
4784        __tmp.put_u8(self.altitude_type as u8);
4785        for val in &self.callsign {
4786            __tmp.put_u8(*val);
4787        }
4788        __tmp.put_u8(self.emitter_type as u8);
4789        __tmp.put_u8(self.tslc);
4790        if matches!(version, MavlinkVersion::V2) {
4791            let len = __tmp.len();
4792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4793        } else {
4794            __tmp.len()
4795        }
4796    }
4797}
4798#[doc = "The airspeed measured by sensors and IMU."]
4799#[doc = ""]
4800#[doc = "ID: 182"]
4801#[derive(Debug, Clone, PartialEq)]
4802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4804pub struct AIRSPEEDS_DATA {
4805    #[doc = "Timestamp (milliseconds since system boot)"]
4806    pub time_boot_ms: u32,
4807    #[doc = "Airspeed estimate from IMU, cm/s"]
4808    pub airspeed_imu: i16,
4809    #[doc = "Pitot measured forward airpseed, cm/s"]
4810    pub airspeed_pitot: i16,
4811    #[doc = "Hot wire anenometer measured airspeed, cm/s"]
4812    pub airspeed_hot_wire: i16,
4813    #[doc = "Ultrasonic measured airspeed, cm/s"]
4814    pub airspeed_ultrasonic: i16,
4815    #[doc = "Angle of attack sensor, degrees * 10"]
4816    pub aoa: i16,
4817    #[doc = "Yaw angle sensor, degrees * 10"]
4818    pub aoy: i16,
4819}
4820impl AIRSPEEDS_DATA {
4821    pub const ENCODED_LEN: usize = 16usize;
4822    pub const DEFAULT: Self = Self {
4823        time_boot_ms: 0_u32,
4824        airspeed_imu: 0_i16,
4825        airspeed_pitot: 0_i16,
4826        airspeed_hot_wire: 0_i16,
4827        airspeed_ultrasonic: 0_i16,
4828        aoa: 0_i16,
4829        aoy: 0_i16,
4830    };
4831    #[cfg(feature = "arbitrary")]
4832    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4833        use arbitrary::{Arbitrary, Unstructured};
4834        let mut buf = [0u8; 1024];
4835        rng.fill_bytes(&mut buf);
4836        let mut unstructured = Unstructured::new(&buf);
4837        Self::arbitrary(&mut unstructured).unwrap_or_default()
4838    }
4839}
4840impl Default for AIRSPEEDS_DATA {
4841    fn default() -> Self {
4842        Self::DEFAULT.clone()
4843    }
4844}
4845impl MessageData for AIRSPEEDS_DATA {
4846    type Message = MavMessage;
4847    const ID: u32 = 182u32;
4848    const NAME: &'static str = "AIRSPEEDS";
4849    const EXTRA_CRC: u8 = 154u8;
4850    const ENCODED_LEN: usize = 16usize;
4851    fn deser(
4852        _version: MavlinkVersion,
4853        __input: &[u8],
4854    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4855        let avail_len = __input.len();
4856        let mut payload_buf = [0; Self::ENCODED_LEN];
4857        let mut buf = if avail_len < Self::ENCODED_LEN {
4858            payload_buf[0..avail_len].copy_from_slice(__input);
4859            Bytes::new(&payload_buf)
4860        } else {
4861            Bytes::new(__input)
4862        };
4863        let mut __struct = Self::default();
4864        __struct.time_boot_ms = buf.get_u32_le();
4865        __struct.airspeed_imu = buf.get_i16_le();
4866        __struct.airspeed_pitot = buf.get_i16_le();
4867        __struct.airspeed_hot_wire = buf.get_i16_le();
4868        __struct.airspeed_ultrasonic = buf.get_i16_le();
4869        __struct.aoa = buf.get_i16_le();
4870        __struct.aoy = buf.get_i16_le();
4871        Ok(__struct)
4872    }
4873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4874        let mut __tmp = BytesMut::new(bytes);
4875        #[allow(clippy::absurd_extreme_comparisons)]
4876        #[allow(unused_comparisons)]
4877        if __tmp.remaining() < Self::ENCODED_LEN {
4878            panic!(
4879                "buffer is too small (need {} bytes, but got {})",
4880                Self::ENCODED_LEN,
4881                __tmp.remaining(),
4882            )
4883        }
4884        __tmp.put_u32_le(self.time_boot_ms);
4885        __tmp.put_i16_le(self.airspeed_imu);
4886        __tmp.put_i16_le(self.airspeed_pitot);
4887        __tmp.put_i16_le(self.airspeed_hot_wire);
4888        __tmp.put_i16_le(self.airspeed_ultrasonic);
4889        __tmp.put_i16_le(self.aoa);
4890        __tmp.put_i16_le(self.aoy);
4891        if matches!(version, MavlinkVersion::V2) {
4892            let len = __tmp.len();
4893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4894        } else {
4895            __tmp.len()
4896        }
4897    }
4898}
4899#[doc = "The location and information of an AIS vessel."]
4900#[doc = ""]
4901#[doc = "ID: 301"]
4902#[derive(Debug, Clone, PartialEq)]
4903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4905pub struct AIS_VESSEL_DATA {
4906    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4907    pub MMSI: u32,
4908    #[doc = "Latitude"]
4909    pub lat: i32,
4910    #[doc = "Longitude"]
4911    pub lon: i32,
4912    #[doc = "Course over ground"]
4913    pub COG: u16,
4914    #[doc = "True heading"]
4915    pub heading: u16,
4916    #[doc = "Speed over ground"]
4917    pub velocity: u16,
4918    #[doc = "Distance from lat/lon location to bow"]
4919    pub dimension_bow: u16,
4920    #[doc = "Distance from lat/lon location to stern"]
4921    pub dimension_stern: u16,
4922    #[doc = "Time since last communication in seconds"]
4923    pub tslc: u16,
4924    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4925    pub flags: AisFlags,
4926    #[doc = "Turn rate"]
4927    pub turn_rate: i8,
4928    #[doc = "Navigational status"]
4929    pub navigational_status: AisNavStatus,
4930    #[doc = "Type of vessels"]
4931    pub mavtype: AisType,
4932    #[doc = "Distance from lat/lon location to port side"]
4933    pub dimension_port: u8,
4934    #[doc = "Distance from lat/lon location to starboard side"]
4935    pub dimension_starboard: u8,
4936    #[doc = "The vessel callsign"]
4937    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4938    pub callsign: [u8; 7],
4939    #[doc = "The vessel name"]
4940    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4941    pub name: [u8; 20],
4942}
4943impl AIS_VESSEL_DATA {
4944    pub const ENCODED_LEN: usize = 58usize;
4945    pub const DEFAULT: Self = Self {
4946        MMSI: 0_u32,
4947        lat: 0_i32,
4948        lon: 0_i32,
4949        COG: 0_u16,
4950        heading: 0_u16,
4951        velocity: 0_u16,
4952        dimension_bow: 0_u16,
4953        dimension_stern: 0_u16,
4954        tslc: 0_u16,
4955        flags: AisFlags::DEFAULT,
4956        turn_rate: 0_i8,
4957        navigational_status: AisNavStatus::DEFAULT,
4958        mavtype: AisType::DEFAULT,
4959        dimension_port: 0_u8,
4960        dimension_starboard: 0_u8,
4961        callsign: [0_u8; 7usize],
4962        name: [0_u8; 20usize],
4963    };
4964    #[cfg(feature = "arbitrary")]
4965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4966        use arbitrary::{Arbitrary, Unstructured};
4967        let mut buf = [0u8; 1024];
4968        rng.fill_bytes(&mut buf);
4969        let mut unstructured = Unstructured::new(&buf);
4970        Self::arbitrary(&mut unstructured).unwrap_or_default()
4971    }
4972}
4973impl Default for AIS_VESSEL_DATA {
4974    fn default() -> Self {
4975        Self::DEFAULT.clone()
4976    }
4977}
4978impl MessageData for AIS_VESSEL_DATA {
4979    type Message = MavMessage;
4980    const ID: u32 = 301u32;
4981    const NAME: &'static str = "AIS_VESSEL";
4982    const EXTRA_CRC: u8 = 243u8;
4983    const ENCODED_LEN: usize = 58usize;
4984    fn deser(
4985        _version: MavlinkVersion,
4986        __input: &[u8],
4987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4988        let avail_len = __input.len();
4989        let mut payload_buf = [0; Self::ENCODED_LEN];
4990        let mut buf = if avail_len < Self::ENCODED_LEN {
4991            payload_buf[0..avail_len].copy_from_slice(__input);
4992            Bytes::new(&payload_buf)
4993        } else {
4994            Bytes::new(__input)
4995        };
4996        let mut __struct = Self::default();
4997        __struct.MMSI = buf.get_u32_le();
4998        __struct.lat = buf.get_i32_le();
4999        __struct.lon = buf.get_i32_le();
5000        __struct.COG = buf.get_u16_le();
5001        __struct.heading = buf.get_u16_le();
5002        __struct.velocity = buf.get_u16_le();
5003        __struct.dimension_bow = buf.get_u16_le();
5004        __struct.dimension_stern = buf.get_u16_le();
5005        __struct.tslc = buf.get_u16_le();
5006        let tmp = buf.get_u16_le();
5007        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
5008            ::mavlink_core::error::ParserError::InvalidFlag {
5009                flag_type: "AisFlags",
5010                value: tmp as u32,
5011            },
5012        )?;
5013        __struct.turn_rate = buf.get_i8();
5014        let tmp = buf.get_u8();
5015        __struct.navigational_status =
5016            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5017                enum_type: "AisNavStatus",
5018                value: tmp as u32,
5019            })?;
5020        let tmp = buf.get_u8();
5021        __struct.mavtype =
5022            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5023                enum_type: "AisType",
5024                value: tmp as u32,
5025            })?;
5026        __struct.dimension_port = buf.get_u8();
5027        __struct.dimension_starboard = buf.get_u8();
5028        for v in &mut __struct.callsign {
5029            let val = buf.get_u8();
5030            *v = val;
5031        }
5032        for v in &mut __struct.name {
5033            let val = buf.get_u8();
5034            *v = val;
5035        }
5036        Ok(__struct)
5037    }
5038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5039        let mut __tmp = BytesMut::new(bytes);
5040        #[allow(clippy::absurd_extreme_comparisons)]
5041        #[allow(unused_comparisons)]
5042        if __tmp.remaining() < Self::ENCODED_LEN {
5043            panic!(
5044                "buffer is too small (need {} bytes, but got {})",
5045                Self::ENCODED_LEN,
5046                __tmp.remaining(),
5047            )
5048        }
5049        __tmp.put_u32_le(self.MMSI);
5050        __tmp.put_i32_le(self.lat);
5051        __tmp.put_i32_le(self.lon);
5052        __tmp.put_u16_le(self.COG);
5053        __tmp.put_u16_le(self.heading);
5054        __tmp.put_u16_le(self.velocity);
5055        __tmp.put_u16_le(self.dimension_bow);
5056        __tmp.put_u16_le(self.dimension_stern);
5057        __tmp.put_u16_le(self.tslc);
5058        __tmp.put_u16_le(self.flags.bits());
5059        __tmp.put_i8(self.turn_rate);
5060        __tmp.put_u8(self.navigational_status as u8);
5061        __tmp.put_u8(self.mavtype as u8);
5062        __tmp.put_u8(self.dimension_port);
5063        __tmp.put_u8(self.dimension_starboard);
5064        for val in &self.callsign {
5065            __tmp.put_u8(*val);
5066        }
5067        for val in &self.name {
5068            __tmp.put_u8(*val);
5069        }
5070        if matches!(version, MavlinkVersion::V2) {
5071            let len = __tmp.len();
5072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5073        } else {
5074            __tmp.len()
5075        }
5076    }
5077}
5078#[doc = "The current system altitude."]
5079#[doc = ""]
5080#[doc = "ID: 141"]
5081#[derive(Debug, Clone, PartialEq)]
5082#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5083#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5084pub struct ALTITUDE_DATA {
5085    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5086    pub time_usec: u64,
5087    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5088    pub altitude_monotonic: f32,
5089    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5090    pub altitude_amsl: f32,
5091    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5092    pub altitude_local: f32,
5093    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5094    pub altitude_relative: f32,
5095    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5096    pub altitude_terrain: f32,
5097    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5098    pub bottom_clearance: f32,
5099}
5100impl ALTITUDE_DATA {
5101    pub const ENCODED_LEN: usize = 32usize;
5102    pub const DEFAULT: Self = Self {
5103        time_usec: 0_u64,
5104        altitude_monotonic: 0.0_f32,
5105        altitude_amsl: 0.0_f32,
5106        altitude_local: 0.0_f32,
5107        altitude_relative: 0.0_f32,
5108        altitude_terrain: 0.0_f32,
5109        bottom_clearance: 0.0_f32,
5110    };
5111    #[cfg(feature = "arbitrary")]
5112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5113        use arbitrary::{Arbitrary, Unstructured};
5114        let mut buf = [0u8; 1024];
5115        rng.fill_bytes(&mut buf);
5116        let mut unstructured = Unstructured::new(&buf);
5117        Self::arbitrary(&mut unstructured).unwrap_or_default()
5118    }
5119}
5120impl Default for ALTITUDE_DATA {
5121    fn default() -> Self {
5122        Self::DEFAULT.clone()
5123    }
5124}
5125impl MessageData for ALTITUDE_DATA {
5126    type Message = MavMessage;
5127    const ID: u32 = 141u32;
5128    const NAME: &'static str = "ALTITUDE";
5129    const EXTRA_CRC: u8 = 47u8;
5130    const ENCODED_LEN: usize = 32usize;
5131    fn deser(
5132        _version: MavlinkVersion,
5133        __input: &[u8],
5134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5135        let avail_len = __input.len();
5136        let mut payload_buf = [0; Self::ENCODED_LEN];
5137        let mut buf = if avail_len < Self::ENCODED_LEN {
5138            payload_buf[0..avail_len].copy_from_slice(__input);
5139            Bytes::new(&payload_buf)
5140        } else {
5141            Bytes::new(__input)
5142        };
5143        let mut __struct = Self::default();
5144        __struct.time_usec = buf.get_u64_le();
5145        __struct.altitude_monotonic = buf.get_f32_le();
5146        __struct.altitude_amsl = buf.get_f32_le();
5147        __struct.altitude_local = buf.get_f32_le();
5148        __struct.altitude_relative = buf.get_f32_le();
5149        __struct.altitude_terrain = buf.get_f32_le();
5150        __struct.bottom_clearance = buf.get_f32_le();
5151        Ok(__struct)
5152    }
5153    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5154        let mut __tmp = BytesMut::new(bytes);
5155        #[allow(clippy::absurd_extreme_comparisons)]
5156        #[allow(unused_comparisons)]
5157        if __tmp.remaining() < Self::ENCODED_LEN {
5158            panic!(
5159                "buffer is too small (need {} bytes, but got {})",
5160                Self::ENCODED_LEN,
5161                __tmp.remaining(),
5162            )
5163        }
5164        __tmp.put_u64_le(self.time_usec);
5165        __tmp.put_f32_le(self.altitude_monotonic);
5166        __tmp.put_f32_le(self.altitude_amsl);
5167        __tmp.put_f32_le(self.altitude_local);
5168        __tmp.put_f32_le(self.altitude_relative);
5169        __tmp.put_f32_le(self.altitude_terrain);
5170        __tmp.put_f32_le(self.bottom_clearance);
5171        if matches!(version, MavlinkVersion::V2) {
5172            let len = __tmp.len();
5173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5174        } else {
5175            __tmp.len()
5176        }
5177    }
5178}
5179#[doc = "The altitude measured by sensors and IMU."]
5180#[doc = ""]
5181#[doc = "ID: 181"]
5182#[derive(Debug, Clone, PartialEq)]
5183#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5184#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5185pub struct ALTITUDES_DATA {
5186    #[doc = "Timestamp (milliseconds since system boot)"]
5187    pub time_boot_ms: u32,
5188    #[doc = "GPS altitude (MSL) in meters, expressed as * 1000 (millimeters)"]
5189    pub alt_gps: i32,
5190    #[doc = "IMU altitude above ground in meters, expressed as * 1000 (millimeters)"]
5191    pub alt_imu: i32,
5192    #[doc = "barometeric altitude above ground in meters, expressed as * 1000 (millimeters)"]
5193    pub alt_barometric: i32,
5194    #[doc = "Optical flow altitude above ground in meters, expressed as * 1000 (millimeters)"]
5195    pub alt_optical_flow: i32,
5196    #[doc = "Rangefinder Altitude above ground in meters, expressed as * 1000 (millimeters)"]
5197    pub alt_range_finder: i32,
5198    #[doc = "Extra altitude above ground in meters, expressed as * 1000 (millimeters)"]
5199    pub alt_extra: i32,
5200}
5201impl ALTITUDES_DATA {
5202    pub const ENCODED_LEN: usize = 28usize;
5203    pub const DEFAULT: Self = Self {
5204        time_boot_ms: 0_u32,
5205        alt_gps: 0_i32,
5206        alt_imu: 0_i32,
5207        alt_barometric: 0_i32,
5208        alt_optical_flow: 0_i32,
5209        alt_range_finder: 0_i32,
5210        alt_extra: 0_i32,
5211    };
5212    #[cfg(feature = "arbitrary")]
5213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5214        use arbitrary::{Arbitrary, Unstructured};
5215        let mut buf = [0u8; 1024];
5216        rng.fill_bytes(&mut buf);
5217        let mut unstructured = Unstructured::new(&buf);
5218        Self::arbitrary(&mut unstructured).unwrap_or_default()
5219    }
5220}
5221impl Default for ALTITUDES_DATA {
5222    fn default() -> Self {
5223        Self::DEFAULT.clone()
5224    }
5225}
5226impl MessageData for ALTITUDES_DATA {
5227    type Message = MavMessage;
5228    const ID: u32 = 181u32;
5229    const NAME: &'static str = "ALTITUDES";
5230    const EXTRA_CRC: u8 = 55u8;
5231    const ENCODED_LEN: usize = 28usize;
5232    fn deser(
5233        _version: MavlinkVersion,
5234        __input: &[u8],
5235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5236        let avail_len = __input.len();
5237        let mut payload_buf = [0; Self::ENCODED_LEN];
5238        let mut buf = if avail_len < Self::ENCODED_LEN {
5239            payload_buf[0..avail_len].copy_from_slice(__input);
5240            Bytes::new(&payload_buf)
5241        } else {
5242            Bytes::new(__input)
5243        };
5244        let mut __struct = Self::default();
5245        __struct.time_boot_ms = buf.get_u32_le();
5246        __struct.alt_gps = buf.get_i32_le();
5247        __struct.alt_imu = buf.get_i32_le();
5248        __struct.alt_barometric = buf.get_i32_le();
5249        __struct.alt_optical_flow = buf.get_i32_le();
5250        __struct.alt_range_finder = buf.get_i32_le();
5251        __struct.alt_extra = buf.get_i32_le();
5252        Ok(__struct)
5253    }
5254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5255        let mut __tmp = BytesMut::new(bytes);
5256        #[allow(clippy::absurd_extreme_comparisons)]
5257        #[allow(unused_comparisons)]
5258        if __tmp.remaining() < Self::ENCODED_LEN {
5259            panic!(
5260                "buffer is too small (need {} bytes, but got {})",
5261                Self::ENCODED_LEN,
5262                __tmp.remaining(),
5263            )
5264        }
5265        __tmp.put_u32_le(self.time_boot_ms);
5266        __tmp.put_i32_le(self.alt_gps);
5267        __tmp.put_i32_le(self.alt_imu);
5268        __tmp.put_i32_le(self.alt_barometric);
5269        __tmp.put_i32_le(self.alt_optical_flow);
5270        __tmp.put_i32_le(self.alt_range_finder);
5271        __tmp.put_i32_le(self.alt_extra);
5272        if matches!(version, MavlinkVersion::V2) {
5273            let len = __tmp.len();
5274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5275        } else {
5276            __tmp.len()
5277        }
5278    }
5279}
5280#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5281#[doc = ""]
5282#[doc = "ID: 30"]
5283#[derive(Debug, Clone, PartialEq)]
5284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5286pub struct ATTITUDE_DATA {
5287    #[doc = "Timestamp (time since system boot)."]
5288    pub time_boot_ms: u32,
5289    #[doc = "Roll angle (-pi..+pi)"]
5290    pub roll: f32,
5291    #[doc = "Pitch angle (-pi..+pi)"]
5292    pub pitch: f32,
5293    #[doc = "Yaw angle (-pi..+pi)"]
5294    pub yaw: f32,
5295    #[doc = "Roll angular speed"]
5296    pub rollspeed: f32,
5297    #[doc = "Pitch angular speed"]
5298    pub pitchspeed: f32,
5299    #[doc = "Yaw angular speed"]
5300    pub yawspeed: f32,
5301}
5302impl ATTITUDE_DATA {
5303    pub const ENCODED_LEN: usize = 28usize;
5304    pub const DEFAULT: Self = Self {
5305        time_boot_ms: 0_u32,
5306        roll: 0.0_f32,
5307        pitch: 0.0_f32,
5308        yaw: 0.0_f32,
5309        rollspeed: 0.0_f32,
5310        pitchspeed: 0.0_f32,
5311        yawspeed: 0.0_f32,
5312    };
5313    #[cfg(feature = "arbitrary")]
5314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5315        use arbitrary::{Arbitrary, Unstructured};
5316        let mut buf = [0u8; 1024];
5317        rng.fill_bytes(&mut buf);
5318        let mut unstructured = Unstructured::new(&buf);
5319        Self::arbitrary(&mut unstructured).unwrap_or_default()
5320    }
5321}
5322impl Default for ATTITUDE_DATA {
5323    fn default() -> Self {
5324        Self::DEFAULT.clone()
5325    }
5326}
5327impl MessageData for ATTITUDE_DATA {
5328    type Message = MavMessage;
5329    const ID: u32 = 30u32;
5330    const NAME: &'static str = "ATTITUDE";
5331    const EXTRA_CRC: u8 = 39u8;
5332    const ENCODED_LEN: usize = 28usize;
5333    fn deser(
5334        _version: MavlinkVersion,
5335        __input: &[u8],
5336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5337        let avail_len = __input.len();
5338        let mut payload_buf = [0; Self::ENCODED_LEN];
5339        let mut buf = if avail_len < Self::ENCODED_LEN {
5340            payload_buf[0..avail_len].copy_from_slice(__input);
5341            Bytes::new(&payload_buf)
5342        } else {
5343            Bytes::new(__input)
5344        };
5345        let mut __struct = Self::default();
5346        __struct.time_boot_ms = buf.get_u32_le();
5347        __struct.roll = buf.get_f32_le();
5348        __struct.pitch = buf.get_f32_le();
5349        __struct.yaw = buf.get_f32_le();
5350        __struct.rollspeed = buf.get_f32_le();
5351        __struct.pitchspeed = buf.get_f32_le();
5352        __struct.yawspeed = buf.get_f32_le();
5353        Ok(__struct)
5354    }
5355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5356        let mut __tmp = BytesMut::new(bytes);
5357        #[allow(clippy::absurd_extreme_comparisons)]
5358        #[allow(unused_comparisons)]
5359        if __tmp.remaining() < Self::ENCODED_LEN {
5360            panic!(
5361                "buffer is too small (need {} bytes, but got {})",
5362                Self::ENCODED_LEN,
5363                __tmp.remaining(),
5364            )
5365        }
5366        __tmp.put_u32_le(self.time_boot_ms);
5367        __tmp.put_f32_le(self.roll);
5368        __tmp.put_f32_le(self.pitch);
5369        __tmp.put_f32_le(self.yaw);
5370        __tmp.put_f32_le(self.rollspeed);
5371        __tmp.put_f32_le(self.pitchspeed);
5372        __tmp.put_f32_le(self.yawspeed);
5373        if matches!(version, MavlinkVersion::V2) {
5374            let len = __tmp.len();
5375            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5376        } else {
5377            __tmp.len()
5378        }
5379    }
5380}
5381#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5382#[doc = ""]
5383#[doc = "ID: 31"]
5384#[derive(Debug, Clone, PartialEq)]
5385#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5387pub struct ATTITUDE_QUATERNION_DATA {
5388    #[doc = "Timestamp (time since system boot)."]
5389    pub time_boot_ms: u32,
5390    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5391    pub q1: f32,
5392    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5393    pub q2: f32,
5394    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5395    pub q3: f32,
5396    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5397    pub q4: f32,
5398    #[doc = "Roll angular speed"]
5399    pub rollspeed: f32,
5400    #[doc = "Pitch angular speed"]
5401    pub pitchspeed: f32,
5402    #[doc = "Yaw angular speed"]
5403    pub yawspeed: f32,
5404    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5405    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5406    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5407    pub repr_offset_q: [f32; 4],
5408}
5409impl ATTITUDE_QUATERNION_DATA {
5410    pub const ENCODED_LEN: usize = 48usize;
5411    pub const DEFAULT: Self = Self {
5412        time_boot_ms: 0_u32,
5413        q1: 0.0_f32,
5414        q2: 0.0_f32,
5415        q3: 0.0_f32,
5416        q4: 0.0_f32,
5417        rollspeed: 0.0_f32,
5418        pitchspeed: 0.0_f32,
5419        yawspeed: 0.0_f32,
5420        repr_offset_q: [0.0_f32; 4usize],
5421    };
5422    #[cfg(feature = "arbitrary")]
5423    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5424        use arbitrary::{Arbitrary, Unstructured};
5425        let mut buf = [0u8; 1024];
5426        rng.fill_bytes(&mut buf);
5427        let mut unstructured = Unstructured::new(&buf);
5428        Self::arbitrary(&mut unstructured).unwrap_or_default()
5429    }
5430}
5431impl Default for ATTITUDE_QUATERNION_DATA {
5432    fn default() -> Self {
5433        Self::DEFAULT.clone()
5434    }
5435}
5436impl MessageData for ATTITUDE_QUATERNION_DATA {
5437    type Message = MavMessage;
5438    const ID: u32 = 31u32;
5439    const NAME: &'static str = "ATTITUDE_QUATERNION";
5440    const EXTRA_CRC: u8 = 246u8;
5441    const ENCODED_LEN: usize = 48usize;
5442    fn deser(
5443        _version: MavlinkVersion,
5444        __input: &[u8],
5445    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5446        let avail_len = __input.len();
5447        let mut payload_buf = [0; Self::ENCODED_LEN];
5448        let mut buf = if avail_len < Self::ENCODED_LEN {
5449            payload_buf[0..avail_len].copy_from_slice(__input);
5450            Bytes::new(&payload_buf)
5451        } else {
5452            Bytes::new(__input)
5453        };
5454        let mut __struct = Self::default();
5455        __struct.time_boot_ms = buf.get_u32_le();
5456        __struct.q1 = buf.get_f32_le();
5457        __struct.q2 = buf.get_f32_le();
5458        __struct.q3 = buf.get_f32_le();
5459        __struct.q4 = buf.get_f32_le();
5460        __struct.rollspeed = buf.get_f32_le();
5461        __struct.pitchspeed = buf.get_f32_le();
5462        __struct.yawspeed = buf.get_f32_le();
5463        for v in &mut __struct.repr_offset_q {
5464            let val = buf.get_f32_le();
5465            *v = val;
5466        }
5467        Ok(__struct)
5468    }
5469    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5470        let mut __tmp = BytesMut::new(bytes);
5471        #[allow(clippy::absurd_extreme_comparisons)]
5472        #[allow(unused_comparisons)]
5473        if __tmp.remaining() < Self::ENCODED_LEN {
5474            panic!(
5475                "buffer is too small (need {} bytes, but got {})",
5476                Self::ENCODED_LEN,
5477                __tmp.remaining(),
5478            )
5479        }
5480        __tmp.put_u32_le(self.time_boot_ms);
5481        __tmp.put_f32_le(self.q1);
5482        __tmp.put_f32_le(self.q2);
5483        __tmp.put_f32_le(self.q3);
5484        __tmp.put_f32_le(self.q4);
5485        __tmp.put_f32_le(self.rollspeed);
5486        __tmp.put_f32_le(self.pitchspeed);
5487        __tmp.put_f32_le(self.yawspeed);
5488        for val in &self.repr_offset_q {
5489            __tmp.put_f32_le(*val);
5490        }
5491        if matches!(version, MavlinkVersion::V2) {
5492            let len = __tmp.len();
5493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5494        } else {
5495            __tmp.len()
5496        }
5497    }
5498}
5499#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5500#[doc = ""]
5501#[doc = "ID: 61"]
5502#[derive(Debug, Clone, PartialEq)]
5503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5505pub struct ATTITUDE_QUATERNION_COV_DATA {
5506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5507    pub time_usec: u64,
5508    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5509    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5510    pub q: [f32; 4],
5511    #[doc = "Roll angular speed"]
5512    pub rollspeed: f32,
5513    #[doc = "Pitch angular speed"]
5514    pub pitchspeed: f32,
5515    #[doc = "Yaw angular speed"]
5516    pub yawspeed: f32,
5517    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5518    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5519    pub covariance: [f32; 9],
5520}
5521impl ATTITUDE_QUATERNION_COV_DATA {
5522    pub const ENCODED_LEN: usize = 72usize;
5523    pub const DEFAULT: Self = Self {
5524        time_usec: 0_u64,
5525        q: [0.0_f32; 4usize],
5526        rollspeed: 0.0_f32,
5527        pitchspeed: 0.0_f32,
5528        yawspeed: 0.0_f32,
5529        covariance: [0.0_f32; 9usize],
5530    };
5531    #[cfg(feature = "arbitrary")]
5532    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5533        use arbitrary::{Arbitrary, Unstructured};
5534        let mut buf = [0u8; 1024];
5535        rng.fill_bytes(&mut buf);
5536        let mut unstructured = Unstructured::new(&buf);
5537        Self::arbitrary(&mut unstructured).unwrap_or_default()
5538    }
5539}
5540impl Default for ATTITUDE_QUATERNION_COV_DATA {
5541    fn default() -> Self {
5542        Self::DEFAULT.clone()
5543    }
5544}
5545impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5546    type Message = MavMessage;
5547    const ID: u32 = 61u32;
5548    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5549    const EXTRA_CRC: u8 = 167u8;
5550    const ENCODED_LEN: usize = 72usize;
5551    fn deser(
5552        _version: MavlinkVersion,
5553        __input: &[u8],
5554    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5555        let avail_len = __input.len();
5556        let mut payload_buf = [0; Self::ENCODED_LEN];
5557        let mut buf = if avail_len < Self::ENCODED_LEN {
5558            payload_buf[0..avail_len].copy_from_slice(__input);
5559            Bytes::new(&payload_buf)
5560        } else {
5561            Bytes::new(__input)
5562        };
5563        let mut __struct = Self::default();
5564        __struct.time_usec = buf.get_u64_le();
5565        for v in &mut __struct.q {
5566            let val = buf.get_f32_le();
5567            *v = val;
5568        }
5569        __struct.rollspeed = buf.get_f32_le();
5570        __struct.pitchspeed = buf.get_f32_le();
5571        __struct.yawspeed = buf.get_f32_le();
5572        for v in &mut __struct.covariance {
5573            let val = buf.get_f32_le();
5574            *v = val;
5575        }
5576        Ok(__struct)
5577    }
5578    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5579        let mut __tmp = BytesMut::new(bytes);
5580        #[allow(clippy::absurd_extreme_comparisons)]
5581        #[allow(unused_comparisons)]
5582        if __tmp.remaining() < Self::ENCODED_LEN {
5583            panic!(
5584                "buffer is too small (need {} bytes, but got {})",
5585                Self::ENCODED_LEN,
5586                __tmp.remaining(),
5587            )
5588        }
5589        __tmp.put_u64_le(self.time_usec);
5590        for val in &self.q {
5591            __tmp.put_f32_le(*val);
5592        }
5593        __tmp.put_f32_le(self.rollspeed);
5594        __tmp.put_f32_le(self.pitchspeed);
5595        __tmp.put_f32_le(self.yawspeed);
5596        for val in &self.covariance {
5597            __tmp.put_f32_le(*val);
5598        }
5599        if matches!(version, MavlinkVersion::V2) {
5600            let len = __tmp.len();
5601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5602        } else {
5603            __tmp.len()
5604        }
5605    }
5606}
5607#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5608#[doc = ""]
5609#[doc = "ID: 83"]
5610#[derive(Debug, Clone, PartialEq)]
5611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5613pub struct ATTITUDE_TARGET_DATA {
5614    #[doc = "Timestamp (time since system boot)."]
5615    pub time_boot_ms: u32,
5616    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5618    pub q: [f32; 4],
5619    #[doc = "Body roll rate"]
5620    pub body_roll_rate: f32,
5621    #[doc = "Body pitch rate"]
5622    pub body_pitch_rate: f32,
5623    #[doc = "Body yaw rate"]
5624    pub body_yaw_rate: f32,
5625    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5626    pub thrust: f32,
5627    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5628    pub type_mask: AttitudeTargetTypemask,
5629}
5630impl ATTITUDE_TARGET_DATA {
5631    pub const ENCODED_LEN: usize = 37usize;
5632    pub const DEFAULT: Self = Self {
5633        time_boot_ms: 0_u32,
5634        q: [0.0_f32; 4usize],
5635        body_roll_rate: 0.0_f32,
5636        body_pitch_rate: 0.0_f32,
5637        body_yaw_rate: 0.0_f32,
5638        thrust: 0.0_f32,
5639        type_mask: AttitudeTargetTypemask::DEFAULT,
5640    };
5641    #[cfg(feature = "arbitrary")]
5642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5643        use arbitrary::{Arbitrary, Unstructured};
5644        let mut buf = [0u8; 1024];
5645        rng.fill_bytes(&mut buf);
5646        let mut unstructured = Unstructured::new(&buf);
5647        Self::arbitrary(&mut unstructured).unwrap_or_default()
5648    }
5649}
5650impl Default for ATTITUDE_TARGET_DATA {
5651    fn default() -> Self {
5652        Self::DEFAULT.clone()
5653    }
5654}
5655impl MessageData for ATTITUDE_TARGET_DATA {
5656    type Message = MavMessage;
5657    const ID: u32 = 83u32;
5658    const NAME: &'static str = "ATTITUDE_TARGET";
5659    const EXTRA_CRC: u8 = 22u8;
5660    const ENCODED_LEN: usize = 37usize;
5661    fn deser(
5662        _version: MavlinkVersion,
5663        __input: &[u8],
5664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5665        let avail_len = __input.len();
5666        let mut payload_buf = [0; Self::ENCODED_LEN];
5667        let mut buf = if avail_len < Self::ENCODED_LEN {
5668            payload_buf[0..avail_len].copy_from_slice(__input);
5669            Bytes::new(&payload_buf)
5670        } else {
5671            Bytes::new(__input)
5672        };
5673        let mut __struct = Self::default();
5674        __struct.time_boot_ms = buf.get_u32_le();
5675        for v in &mut __struct.q {
5676            let val = buf.get_f32_le();
5677            *v = val;
5678        }
5679        __struct.body_roll_rate = buf.get_f32_le();
5680        __struct.body_pitch_rate = buf.get_f32_le();
5681        __struct.body_yaw_rate = buf.get_f32_le();
5682        __struct.thrust = buf.get_f32_le();
5683        let tmp = buf.get_u8();
5684        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5685            tmp & AttitudeTargetTypemask::all().bits(),
5686        )
5687        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5688            flag_type: "AttitudeTargetTypemask",
5689            value: tmp as u32,
5690        })?;
5691        Ok(__struct)
5692    }
5693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5694        let mut __tmp = BytesMut::new(bytes);
5695        #[allow(clippy::absurd_extreme_comparisons)]
5696        #[allow(unused_comparisons)]
5697        if __tmp.remaining() < Self::ENCODED_LEN {
5698            panic!(
5699                "buffer is too small (need {} bytes, but got {})",
5700                Self::ENCODED_LEN,
5701                __tmp.remaining(),
5702            )
5703        }
5704        __tmp.put_u32_le(self.time_boot_ms);
5705        for val in &self.q {
5706            __tmp.put_f32_le(*val);
5707        }
5708        __tmp.put_f32_le(self.body_roll_rate);
5709        __tmp.put_f32_le(self.body_pitch_rate);
5710        __tmp.put_f32_le(self.body_yaw_rate);
5711        __tmp.put_f32_le(self.thrust);
5712        __tmp.put_u8(self.type_mask.bits());
5713        if matches!(version, MavlinkVersion::V2) {
5714            let len = __tmp.len();
5715            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5716        } else {
5717            __tmp.len()
5718        }
5719    }
5720}
5721#[doc = "Motion capture attitude and position."]
5722#[doc = ""]
5723#[doc = "ID: 138"]
5724#[derive(Debug, Clone, PartialEq)]
5725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5727pub struct ATT_POS_MOCAP_DATA {
5728    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5729    pub time_usec: u64,
5730    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5731    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5732    pub q: [f32; 4],
5733    #[doc = "X position (NED)"]
5734    pub x: f32,
5735    #[doc = "Y position (NED)"]
5736    pub y: f32,
5737    #[doc = "Z position (NED)"]
5738    pub z: f32,
5739    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5740    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5741    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5742    pub covariance: [f32; 21],
5743}
5744impl ATT_POS_MOCAP_DATA {
5745    pub const ENCODED_LEN: usize = 120usize;
5746    pub const DEFAULT: Self = Self {
5747        time_usec: 0_u64,
5748        q: [0.0_f32; 4usize],
5749        x: 0.0_f32,
5750        y: 0.0_f32,
5751        z: 0.0_f32,
5752        covariance: [0.0_f32; 21usize],
5753    };
5754    #[cfg(feature = "arbitrary")]
5755    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5756        use arbitrary::{Arbitrary, Unstructured};
5757        let mut buf = [0u8; 1024];
5758        rng.fill_bytes(&mut buf);
5759        let mut unstructured = Unstructured::new(&buf);
5760        Self::arbitrary(&mut unstructured).unwrap_or_default()
5761    }
5762}
5763impl Default for ATT_POS_MOCAP_DATA {
5764    fn default() -> Self {
5765        Self::DEFAULT.clone()
5766    }
5767}
5768impl MessageData for ATT_POS_MOCAP_DATA {
5769    type Message = MavMessage;
5770    const ID: u32 = 138u32;
5771    const NAME: &'static str = "ATT_POS_MOCAP";
5772    const EXTRA_CRC: u8 = 109u8;
5773    const ENCODED_LEN: usize = 120usize;
5774    fn deser(
5775        _version: MavlinkVersion,
5776        __input: &[u8],
5777    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5778        let avail_len = __input.len();
5779        let mut payload_buf = [0; Self::ENCODED_LEN];
5780        let mut buf = if avail_len < Self::ENCODED_LEN {
5781            payload_buf[0..avail_len].copy_from_slice(__input);
5782            Bytes::new(&payload_buf)
5783        } else {
5784            Bytes::new(__input)
5785        };
5786        let mut __struct = Self::default();
5787        __struct.time_usec = buf.get_u64_le();
5788        for v in &mut __struct.q {
5789            let val = buf.get_f32_le();
5790            *v = val;
5791        }
5792        __struct.x = buf.get_f32_le();
5793        __struct.y = buf.get_f32_le();
5794        __struct.z = buf.get_f32_le();
5795        for v in &mut __struct.covariance {
5796            let val = buf.get_f32_le();
5797            *v = val;
5798        }
5799        Ok(__struct)
5800    }
5801    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5802        let mut __tmp = BytesMut::new(bytes);
5803        #[allow(clippy::absurd_extreme_comparisons)]
5804        #[allow(unused_comparisons)]
5805        if __tmp.remaining() < Self::ENCODED_LEN {
5806            panic!(
5807                "buffer is too small (need {} bytes, but got {})",
5808                Self::ENCODED_LEN,
5809                __tmp.remaining(),
5810            )
5811        }
5812        __tmp.put_u64_le(self.time_usec);
5813        for val in &self.q {
5814            __tmp.put_f32_le(*val);
5815        }
5816        __tmp.put_f32_le(self.x);
5817        __tmp.put_f32_le(self.y);
5818        __tmp.put_f32_le(self.z);
5819        for val in &self.covariance {
5820            __tmp.put_f32_le(*val);
5821        }
5822        if matches!(version, MavlinkVersion::V2) {
5823            let len = __tmp.len();
5824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5825        } else {
5826            __tmp.len()
5827        }
5828    }
5829}
5830#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5831#[doc = ""]
5832#[doc = "ID: 7"]
5833#[derive(Debug, Clone, PartialEq)]
5834#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5835#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5836pub struct AUTH_KEY_DATA {
5837    #[doc = "key"]
5838    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5839    pub key: [u8; 32],
5840}
5841impl AUTH_KEY_DATA {
5842    pub const ENCODED_LEN: usize = 32usize;
5843    pub const DEFAULT: Self = Self {
5844        key: [0_u8; 32usize],
5845    };
5846    #[cfg(feature = "arbitrary")]
5847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5848        use arbitrary::{Arbitrary, Unstructured};
5849        let mut buf = [0u8; 1024];
5850        rng.fill_bytes(&mut buf);
5851        let mut unstructured = Unstructured::new(&buf);
5852        Self::arbitrary(&mut unstructured).unwrap_or_default()
5853    }
5854}
5855impl Default for AUTH_KEY_DATA {
5856    fn default() -> Self {
5857        Self::DEFAULT.clone()
5858    }
5859}
5860impl MessageData for AUTH_KEY_DATA {
5861    type Message = MavMessage;
5862    const ID: u32 = 7u32;
5863    const NAME: &'static str = "AUTH_KEY";
5864    const EXTRA_CRC: u8 = 119u8;
5865    const ENCODED_LEN: usize = 32usize;
5866    fn deser(
5867        _version: MavlinkVersion,
5868        __input: &[u8],
5869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5870        let avail_len = __input.len();
5871        let mut payload_buf = [0; Self::ENCODED_LEN];
5872        let mut buf = if avail_len < Self::ENCODED_LEN {
5873            payload_buf[0..avail_len].copy_from_slice(__input);
5874            Bytes::new(&payload_buf)
5875        } else {
5876            Bytes::new(__input)
5877        };
5878        let mut __struct = Self::default();
5879        for v in &mut __struct.key {
5880            let val = buf.get_u8();
5881            *v = val;
5882        }
5883        Ok(__struct)
5884    }
5885    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5886        let mut __tmp = BytesMut::new(bytes);
5887        #[allow(clippy::absurd_extreme_comparisons)]
5888        #[allow(unused_comparisons)]
5889        if __tmp.remaining() < Self::ENCODED_LEN {
5890            panic!(
5891                "buffer is too small (need {} bytes, but got {})",
5892                Self::ENCODED_LEN,
5893                __tmp.remaining(),
5894            )
5895        }
5896        for val in &self.key {
5897            __tmp.put_u8(*val);
5898        }
5899        if matches!(version, MavlinkVersion::V2) {
5900            let len = __tmp.len();
5901            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5902        } else {
5903            __tmp.len()
5904        }
5905    }
5906}
5907#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5908#[doc = ""]
5909#[doc = "ID: 286"]
5910#[derive(Debug, Clone, PartialEq)]
5911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5913pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5914    #[doc = "Timestamp (time since system boot)."]
5915    pub time_boot_us: u64,
5916    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5917    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5918    pub q: [f32; 4],
5919    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5920    pub q_estimated_delay_us: u32,
5921    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5922    pub vx: f32,
5923    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5924    pub vy: f32,
5925    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5926    pub vz: f32,
5927    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5928    pub v_estimated_delay_us: u32,
5929    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5930    pub feed_forward_angular_velocity_z: f32,
5931    #[doc = "Bitmap indicating which estimator outputs are valid."]
5932    pub estimator_status: EstimatorStatusFlags,
5933    #[doc = "System ID"]
5934    pub target_system: u8,
5935    #[doc = "Component ID"]
5936    pub target_component: u8,
5937    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5938    pub landed_state: MavLandedState,
5939    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5940    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5941    pub angular_velocity_z: f32,
5942}
5943impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5944    pub const ENCODED_LEN: usize = 57usize;
5945    pub const DEFAULT: Self = Self {
5946        time_boot_us: 0_u64,
5947        q: [0.0_f32; 4usize],
5948        q_estimated_delay_us: 0_u32,
5949        vx: 0.0_f32,
5950        vy: 0.0_f32,
5951        vz: 0.0_f32,
5952        v_estimated_delay_us: 0_u32,
5953        feed_forward_angular_velocity_z: 0.0_f32,
5954        estimator_status: EstimatorStatusFlags::DEFAULT,
5955        target_system: 0_u8,
5956        target_component: 0_u8,
5957        landed_state: MavLandedState::DEFAULT,
5958        angular_velocity_z: 0.0_f32,
5959    };
5960    #[cfg(feature = "arbitrary")]
5961    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5962        use arbitrary::{Arbitrary, Unstructured};
5963        let mut buf = [0u8; 1024];
5964        rng.fill_bytes(&mut buf);
5965        let mut unstructured = Unstructured::new(&buf);
5966        Self::arbitrary(&mut unstructured).unwrap_or_default()
5967    }
5968}
5969impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5970    fn default() -> Self {
5971        Self::DEFAULT.clone()
5972    }
5973}
5974impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5975    type Message = MavMessage;
5976    const ID: u32 = 286u32;
5977    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5978    const EXTRA_CRC: u8 = 210u8;
5979    const ENCODED_LEN: usize = 57usize;
5980    fn deser(
5981        _version: MavlinkVersion,
5982        __input: &[u8],
5983    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5984        let avail_len = __input.len();
5985        let mut payload_buf = [0; Self::ENCODED_LEN];
5986        let mut buf = if avail_len < Self::ENCODED_LEN {
5987            payload_buf[0..avail_len].copy_from_slice(__input);
5988            Bytes::new(&payload_buf)
5989        } else {
5990            Bytes::new(__input)
5991        };
5992        let mut __struct = Self::default();
5993        __struct.time_boot_us = buf.get_u64_le();
5994        for v in &mut __struct.q {
5995            let val = buf.get_f32_le();
5996            *v = val;
5997        }
5998        __struct.q_estimated_delay_us = buf.get_u32_le();
5999        __struct.vx = buf.get_f32_le();
6000        __struct.vy = buf.get_f32_le();
6001        __struct.vz = buf.get_f32_le();
6002        __struct.v_estimated_delay_us = buf.get_u32_le();
6003        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
6004        let tmp = buf.get_u16_le();
6005        __struct.estimator_status = EstimatorStatusFlags::from_bits(
6006            tmp & EstimatorStatusFlags::all().bits(),
6007        )
6008        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6009            flag_type: "EstimatorStatusFlags",
6010            value: tmp as u32,
6011        })?;
6012        __struct.target_system = buf.get_u8();
6013        __struct.target_component = buf.get_u8();
6014        let tmp = buf.get_u8();
6015        __struct.landed_state =
6016            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6017                enum_type: "MavLandedState",
6018                value: tmp as u32,
6019            })?;
6020        __struct.angular_velocity_z = buf.get_f32_le();
6021        Ok(__struct)
6022    }
6023    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6024        let mut __tmp = BytesMut::new(bytes);
6025        #[allow(clippy::absurd_extreme_comparisons)]
6026        #[allow(unused_comparisons)]
6027        if __tmp.remaining() < Self::ENCODED_LEN {
6028            panic!(
6029                "buffer is too small (need {} bytes, but got {})",
6030                Self::ENCODED_LEN,
6031                __tmp.remaining(),
6032            )
6033        }
6034        __tmp.put_u64_le(self.time_boot_us);
6035        for val in &self.q {
6036            __tmp.put_f32_le(*val);
6037        }
6038        __tmp.put_u32_le(self.q_estimated_delay_us);
6039        __tmp.put_f32_le(self.vx);
6040        __tmp.put_f32_le(self.vy);
6041        __tmp.put_f32_le(self.vz);
6042        __tmp.put_u32_le(self.v_estimated_delay_us);
6043        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
6044        __tmp.put_u16_le(self.estimator_status.bits());
6045        __tmp.put_u8(self.target_system);
6046        __tmp.put_u8(self.target_component);
6047        __tmp.put_u8(self.landed_state as u8);
6048        __tmp.put_f32_le(self.angular_velocity_z);
6049        if matches!(version, MavlinkVersion::V2) {
6050            let len = __tmp.len();
6051            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6052        } else {
6053            __tmp.len()
6054        }
6055    }
6056}
6057#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
6058#[doc = ""]
6059#[doc = "ID: 148"]
6060#[derive(Debug, Clone, PartialEq)]
6061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6063pub struct AUTOPILOT_VERSION_DATA {
6064    #[doc = "Bitmap of capabilities"]
6065    pub capabilities: MavProtocolCapability,
6066    #[doc = "UID if provided by hardware (see uid2)"]
6067    pub uid: u64,
6068    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
6069    pub flight_sw_version: u32,
6070    #[doc = "Middleware version number"]
6071    pub middleware_sw_version: u32,
6072    #[doc = "Operating system version number"]
6073    pub os_sw_version: u32,
6074    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
6075    pub board_version: u32,
6076    #[doc = "ID of the board vendor"]
6077    pub vendor_id: u16,
6078    #[doc = "ID of the product"]
6079    pub product_id: u16,
6080    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6081    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6082    pub flight_custom_version: [u8; 8],
6083    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6084    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6085    pub middleware_custom_version: [u8; 8],
6086    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
6087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6088    pub os_custom_version: [u8; 8],
6089    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
6090    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6091    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6092    pub uid2: [u8; 18],
6093}
6094impl AUTOPILOT_VERSION_DATA {
6095    pub const ENCODED_LEN: usize = 78usize;
6096    pub const DEFAULT: Self = Self {
6097        capabilities: MavProtocolCapability::DEFAULT,
6098        uid: 0_u64,
6099        flight_sw_version: 0_u32,
6100        middleware_sw_version: 0_u32,
6101        os_sw_version: 0_u32,
6102        board_version: 0_u32,
6103        vendor_id: 0_u16,
6104        product_id: 0_u16,
6105        flight_custom_version: [0_u8; 8usize],
6106        middleware_custom_version: [0_u8; 8usize],
6107        os_custom_version: [0_u8; 8usize],
6108        uid2: [0_u8; 18usize],
6109    };
6110    #[cfg(feature = "arbitrary")]
6111    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6112        use arbitrary::{Arbitrary, Unstructured};
6113        let mut buf = [0u8; 1024];
6114        rng.fill_bytes(&mut buf);
6115        let mut unstructured = Unstructured::new(&buf);
6116        Self::arbitrary(&mut unstructured).unwrap_or_default()
6117    }
6118}
6119impl Default for AUTOPILOT_VERSION_DATA {
6120    fn default() -> Self {
6121        Self::DEFAULT.clone()
6122    }
6123}
6124impl MessageData for AUTOPILOT_VERSION_DATA {
6125    type Message = MavMessage;
6126    const ID: u32 = 148u32;
6127    const NAME: &'static str = "AUTOPILOT_VERSION";
6128    const EXTRA_CRC: u8 = 178u8;
6129    const ENCODED_LEN: usize = 78usize;
6130    fn deser(
6131        _version: MavlinkVersion,
6132        __input: &[u8],
6133    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6134        let avail_len = __input.len();
6135        let mut payload_buf = [0; Self::ENCODED_LEN];
6136        let mut buf = if avail_len < Self::ENCODED_LEN {
6137            payload_buf[0..avail_len].copy_from_slice(__input);
6138            Bytes::new(&payload_buf)
6139        } else {
6140            Bytes::new(__input)
6141        };
6142        let mut __struct = Self::default();
6143        let tmp = buf.get_u64_le();
6144        __struct.capabilities = MavProtocolCapability::from_bits(
6145            tmp & MavProtocolCapability::all().bits(),
6146        )
6147        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6148            flag_type: "MavProtocolCapability",
6149            value: tmp as u32,
6150        })?;
6151        __struct.uid = buf.get_u64_le();
6152        __struct.flight_sw_version = buf.get_u32_le();
6153        __struct.middleware_sw_version = buf.get_u32_le();
6154        __struct.os_sw_version = buf.get_u32_le();
6155        __struct.board_version = buf.get_u32_le();
6156        __struct.vendor_id = buf.get_u16_le();
6157        __struct.product_id = buf.get_u16_le();
6158        for v in &mut __struct.flight_custom_version {
6159            let val = buf.get_u8();
6160            *v = val;
6161        }
6162        for v in &mut __struct.middleware_custom_version {
6163            let val = buf.get_u8();
6164            *v = val;
6165        }
6166        for v in &mut __struct.os_custom_version {
6167            let val = buf.get_u8();
6168            *v = val;
6169        }
6170        for v in &mut __struct.uid2 {
6171            let val = buf.get_u8();
6172            *v = val;
6173        }
6174        Ok(__struct)
6175    }
6176    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6177        let mut __tmp = BytesMut::new(bytes);
6178        #[allow(clippy::absurd_extreme_comparisons)]
6179        #[allow(unused_comparisons)]
6180        if __tmp.remaining() < Self::ENCODED_LEN {
6181            panic!(
6182                "buffer is too small (need {} bytes, but got {})",
6183                Self::ENCODED_LEN,
6184                __tmp.remaining(),
6185            )
6186        }
6187        __tmp.put_u64_le(self.capabilities.bits());
6188        __tmp.put_u64_le(self.uid);
6189        __tmp.put_u32_le(self.flight_sw_version);
6190        __tmp.put_u32_le(self.middleware_sw_version);
6191        __tmp.put_u32_le(self.os_sw_version);
6192        __tmp.put_u32_le(self.board_version);
6193        __tmp.put_u16_le(self.vendor_id);
6194        __tmp.put_u16_le(self.product_id);
6195        for val in &self.flight_custom_version {
6196            __tmp.put_u8(*val);
6197        }
6198        for val in &self.middleware_custom_version {
6199            __tmp.put_u8(*val);
6200        }
6201        for val in &self.os_custom_version {
6202            __tmp.put_u8(*val);
6203        }
6204        for val in &self.uid2 {
6205            __tmp.put_u8(*val);
6206        }
6207        if matches!(version, MavlinkVersion::V2) {
6208            let len = __tmp.len();
6209            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6210        } else {
6211            __tmp.len()
6212        }
6213    }
6214}
6215#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6216#[doc = ""]
6217#[doc = "ID: 435"]
6218#[derive(Debug, Clone, PartialEq)]
6219#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6220#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6221pub struct AVAILABLE_MODES_DATA {
6222    #[doc = "A bitfield for use for autopilot-specific flags"]
6223    pub custom_mode: u32,
6224    #[doc = "Mode properties."]
6225    pub properties: MavModeProperty,
6226    #[doc = "The total number of available modes for the current vehicle type."]
6227    pub number_modes: u8,
6228    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6229    pub mode_index: u8,
6230    #[doc = "Standard mode."]
6231    pub standard_mode: MavStandardMode,
6232    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6233    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6234    pub mode_name: [u8; 35],
6235}
6236impl AVAILABLE_MODES_DATA {
6237    pub const ENCODED_LEN: usize = 46usize;
6238    pub const DEFAULT: Self = Self {
6239        custom_mode: 0_u32,
6240        properties: MavModeProperty::DEFAULT,
6241        number_modes: 0_u8,
6242        mode_index: 0_u8,
6243        standard_mode: MavStandardMode::DEFAULT,
6244        mode_name: [0_u8; 35usize],
6245    };
6246    #[cfg(feature = "arbitrary")]
6247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6248        use arbitrary::{Arbitrary, Unstructured};
6249        let mut buf = [0u8; 1024];
6250        rng.fill_bytes(&mut buf);
6251        let mut unstructured = Unstructured::new(&buf);
6252        Self::arbitrary(&mut unstructured).unwrap_or_default()
6253    }
6254}
6255impl Default for AVAILABLE_MODES_DATA {
6256    fn default() -> Self {
6257        Self::DEFAULT.clone()
6258    }
6259}
6260impl MessageData for AVAILABLE_MODES_DATA {
6261    type Message = MavMessage;
6262    const ID: u32 = 435u32;
6263    const NAME: &'static str = "AVAILABLE_MODES";
6264    const EXTRA_CRC: u8 = 134u8;
6265    const ENCODED_LEN: usize = 46usize;
6266    fn deser(
6267        _version: MavlinkVersion,
6268        __input: &[u8],
6269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6270        let avail_len = __input.len();
6271        let mut payload_buf = [0; Self::ENCODED_LEN];
6272        let mut buf = if avail_len < Self::ENCODED_LEN {
6273            payload_buf[0..avail_len].copy_from_slice(__input);
6274            Bytes::new(&payload_buf)
6275        } else {
6276            Bytes::new(__input)
6277        };
6278        let mut __struct = Self::default();
6279        __struct.custom_mode = buf.get_u32_le();
6280        let tmp = buf.get_u32_le();
6281        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6282            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6283                flag_type: "MavModeProperty",
6284                value: tmp as u32,
6285            })?;
6286        __struct.number_modes = buf.get_u8();
6287        __struct.mode_index = buf.get_u8();
6288        let tmp = buf.get_u8();
6289        __struct.standard_mode =
6290            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6291                enum_type: "MavStandardMode",
6292                value: tmp as u32,
6293            })?;
6294        for v in &mut __struct.mode_name {
6295            let val = buf.get_u8();
6296            *v = val;
6297        }
6298        Ok(__struct)
6299    }
6300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6301        let mut __tmp = BytesMut::new(bytes);
6302        #[allow(clippy::absurd_extreme_comparisons)]
6303        #[allow(unused_comparisons)]
6304        if __tmp.remaining() < Self::ENCODED_LEN {
6305            panic!(
6306                "buffer is too small (need {} bytes, but got {})",
6307                Self::ENCODED_LEN,
6308                __tmp.remaining(),
6309            )
6310        }
6311        __tmp.put_u32_le(self.custom_mode);
6312        __tmp.put_u32_le(self.properties.bits());
6313        __tmp.put_u8(self.number_modes);
6314        __tmp.put_u8(self.mode_index);
6315        __tmp.put_u8(self.standard_mode as u8);
6316        for val in &self.mode_name {
6317            __tmp.put_u8(*val);
6318        }
6319        if matches!(version, MavlinkVersion::V2) {
6320            let len = __tmp.len();
6321            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6322        } else {
6323            __tmp.len()
6324        }
6325    }
6326}
6327#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6328#[doc = ""]
6329#[doc = "ID: 437"]
6330#[derive(Debug, Clone, PartialEq)]
6331#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6332#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6333pub struct AVAILABLE_MODES_MONITOR_DATA {
6334    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6335    pub seq: u8,
6336}
6337impl AVAILABLE_MODES_MONITOR_DATA {
6338    pub const ENCODED_LEN: usize = 1usize;
6339    pub const DEFAULT: Self = Self { seq: 0_u8 };
6340    #[cfg(feature = "arbitrary")]
6341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6342        use arbitrary::{Arbitrary, Unstructured};
6343        let mut buf = [0u8; 1024];
6344        rng.fill_bytes(&mut buf);
6345        let mut unstructured = Unstructured::new(&buf);
6346        Self::arbitrary(&mut unstructured).unwrap_or_default()
6347    }
6348}
6349impl Default for AVAILABLE_MODES_MONITOR_DATA {
6350    fn default() -> Self {
6351        Self::DEFAULT.clone()
6352    }
6353}
6354impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6355    type Message = MavMessage;
6356    const ID: u32 = 437u32;
6357    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6358    const EXTRA_CRC: u8 = 30u8;
6359    const ENCODED_LEN: usize = 1usize;
6360    fn deser(
6361        _version: MavlinkVersion,
6362        __input: &[u8],
6363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6364        let avail_len = __input.len();
6365        let mut payload_buf = [0; Self::ENCODED_LEN];
6366        let mut buf = if avail_len < Self::ENCODED_LEN {
6367            payload_buf[0..avail_len].copy_from_slice(__input);
6368            Bytes::new(&payload_buf)
6369        } else {
6370            Bytes::new(__input)
6371        };
6372        let mut __struct = Self::default();
6373        __struct.seq = buf.get_u8();
6374        Ok(__struct)
6375    }
6376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6377        let mut __tmp = BytesMut::new(bytes);
6378        #[allow(clippy::absurd_extreme_comparisons)]
6379        #[allow(unused_comparisons)]
6380        if __tmp.remaining() < Self::ENCODED_LEN {
6381            panic!(
6382                "buffer is too small (need {} bytes, but got {})",
6383                Self::ENCODED_LEN,
6384                __tmp.remaining(),
6385            )
6386        }
6387        __tmp.put_u8(self.seq);
6388        if matches!(version, MavlinkVersion::V2) {
6389            let len = __tmp.len();
6390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6391        } else {
6392            __tmp.len()
6393        }
6394    }
6395}
6396#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6397#[doc = ""]
6398#[doc = "ID: 372"]
6399#[derive(Debug, Clone, PartialEq)]
6400#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6401#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6402pub struct BATTERY_INFO_DATA {
6403    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6404    pub discharge_minimum_voltage: f32,
6405    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6406    pub charging_minimum_voltage: f32,
6407    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6408    pub resting_minimum_voltage: f32,
6409    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6410    pub charging_maximum_voltage: f32,
6411    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6412    pub charging_maximum_current: f32,
6413    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6414    pub nominal_voltage: f32,
6415    #[doc = "Maximum pack discharge current. 0: field not provided."]
6416    pub discharge_maximum_current: f32,
6417    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6418    pub discharge_maximum_burst_current: f32,
6419    #[doc = "Fully charged design capacity. 0: field not provided."]
6420    pub design_capacity: f32,
6421    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6422    pub full_charge_capacity: f32,
6423    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6424    pub cycle_count: u16,
6425    #[doc = "Battery weight. 0: field not provided."]
6426    pub weight: u16,
6427    #[doc = "Battery ID"]
6428    pub id: u8,
6429    #[doc = "Function of the battery."]
6430    pub battery_function: MavBatteryFunction,
6431    #[doc = "Type (chemistry) of the battery."]
6432    pub mavtype: MavBatteryType,
6433    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6434    pub state_of_health: u8,
6435    #[doc = "Number of battery cells in series. 0: field not provided."]
6436    pub cells_in_series: u8,
6437    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6439    pub manufacture_date: [u8; 9],
6440    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6441    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6442    pub serial_number: [u8; 32],
6443    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6444    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6445    pub name: [u8; 50],
6446}
6447impl BATTERY_INFO_DATA {
6448    pub const ENCODED_LEN: usize = 140usize;
6449    pub const DEFAULT: Self = Self {
6450        discharge_minimum_voltage: 0.0_f32,
6451        charging_minimum_voltage: 0.0_f32,
6452        resting_minimum_voltage: 0.0_f32,
6453        charging_maximum_voltage: 0.0_f32,
6454        charging_maximum_current: 0.0_f32,
6455        nominal_voltage: 0.0_f32,
6456        discharge_maximum_current: 0.0_f32,
6457        discharge_maximum_burst_current: 0.0_f32,
6458        design_capacity: 0.0_f32,
6459        full_charge_capacity: 0.0_f32,
6460        cycle_count: 0_u16,
6461        weight: 0_u16,
6462        id: 0_u8,
6463        battery_function: MavBatteryFunction::DEFAULT,
6464        mavtype: MavBatteryType::DEFAULT,
6465        state_of_health: 0_u8,
6466        cells_in_series: 0_u8,
6467        manufacture_date: [0_u8; 9usize],
6468        serial_number: [0_u8; 32usize],
6469        name: [0_u8; 50usize],
6470    };
6471    #[cfg(feature = "arbitrary")]
6472    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6473        use arbitrary::{Arbitrary, Unstructured};
6474        let mut buf = [0u8; 1024];
6475        rng.fill_bytes(&mut buf);
6476        let mut unstructured = Unstructured::new(&buf);
6477        Self::arbitrary(&mut unstructured).unwrap_or_default()
6478    }
6479}
6480impl Default for BATTERY_INFO_DATA {
6481    fn default() -> Self {
6482        Self::DEFAULT.clone()
6483    }
6484}
6485impl MessageData for BATTERY_INFO_DATA {
6486    type Message = MavMessage;
6487    const ID: u32 = 372u32;
6488    const NAME: &'static str = "BATTERY_INFO";
6489    const EXTRA_CRC: u8 = 26u8;
6490    const ENCODED_LEN: usize = 140usize;
6491    fn deser(
6492        _version: MavlinkVersion,
6493        __input: &[u8],
6494    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6495        let avail_len = __input.len();
6496        let mut payload_buf = [0; Self::ENCODED_LEN];
6497        let mut buf = if avail_len < Self::ENCODED_LEN {
6498            payload_buf[0..avail_len].copy_from_slice(__input);
6499            Bytes::new(&payload_buf)
6500        } else {
6501            Bytes::new(__input)
6502        };
6503        let mut __struct = Self::default();
6504        __struct.discharge_minimum_voltage = buf.get_f32_le();
6505        __struct.charging_minimum_voltage = buf.get_f32_le();
6506        __struct.resting_minimum_voltage = buf.get_f32_le();
6507        __struct.charging_maximum_voltage = buf.get_f32_le();
6508        __struct.charging_maximum_current = buf.get_f32_le();
6509        __struct.nominal_voltage = buf.get_f32_le();
6510        __struct.discharge_maximum_current = buf.get_f32_le();
6511        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6512        __struct.design_capacity = buf.get_f32_le();
6513        __struct.full_charge_capacity = buf.get_f32_le();
6514        __struct.cycle_count = buf.get_u16_le();
6515        __struct.weight = buf.get_u16_le();
6516        __struct.id = buf.get_u8();
6517        let tmp = buf.get_u8();
6518        __struct.battery_function =
6519            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6520                enum_type: "MavBatteryFunction",
6521                value: tmp as u32,
6522            })?;
6523        let tmp = buf.get_u8();
6524        __struct.mavtype =
6525            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6526                enum_type: "MavBatteryType",
6527                value: tmp as u32,
6528            })?;
6529        __struct.state_of_health = buf.get_u8();
6530        __struct.cells_in_series = buf.get_u8();
6531        for v in &mut __struct.manufacture_date {
6532            let val = buf.get_u8();
6533            *v = val;
6534        }
6535        for v in &mut __struct.serial_number {
6536            let val = buf.get_u8();
6537            *v = val;
6538        }
6539        for v in &mut __struct.name {
6540            let val = buf.get_u8();
6541            *v = val;
6542        }
6543        Ok(__struct)
6544    }
6545    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6546        let mut __tmp = BytesMut::new(bytes);
6547        #[allow(clippy::absurd_extreme_comparisons)]
6548        #[allow(unused_comparisons)]
6549        if __tmp.remaining() < Self::ENCODED_LEN {
6550            panic!(
6551                "buffer is too small (need {} bytes, but got {})",
6552                Self::ENCODED_LEN,
6553                __tmp.remaining(),
6554            )
6555        }
6556        __tmp.put_f32_le(self.discharge_minimum_voltage);
6557        __tmp.put_f32_le(self.charging_minimum_voltage);
6558        __tmp.put_f32_le(self.resting_minimum_voltage);
6559        __tmp.put_f32_le(self.charging_maximum_voltage);
6560        __tmp.put_f32_le(self.charging_maximum_current);
6561        __tmp.put_f32_le(self.nominal_voltage);
6562        __tmp.put_f32_le(self.discharge_maximum_current);
6563        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6564        __tmp.put_f32_le(self.design_capacity);
6565        __tmp.put_f32_le(self.full_charge_capacity);
6566        __tmp.put_u16_le(self.cycle_count);
6567        __tmp.put_u16_le(self.weight);
6568        __tmp.put_u8(self.id);
6569        __tmp.put_u8(self.battery_function as u8);
6570        __tmp.put_u8(self.mavtype as u8);
6571        __tmp.put_u8(self.state_of_health);
6572        __tmp.put_u8(self.cells_in_series);
6573        for val in &self.manufacture_date {
6574            __tmp.put_u8(*val);
6575        }
6576        for val in &self.serial_number {
6577            __tmp.put_u8(*val);
6578        }
6579        for val in &self.name {
6580            __tmp.put_u8(*val);
6581        }
6582        if matches!(version, MavlinkVersion::V2) {
6583            let len = __tmp.len();
6584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6585        } else {
6586            __tmp.len()
6587        }
6588    }
6589}
6590#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6591#[doc = ""]
6592#[doc = "ID: 147"]
6593#[derive(Debug, Clone, PartialEq)]
6594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6596pub struct BATTERY_STATUS_DATA {
6597    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6598    pub current_consumed: i32,
6599    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6600    pub energy_consumed: i32,
6601    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6602    pub temperature: i16,
6603    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6604    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6605    pub voltages: [u16; 10],
6606    #[doc = "Battery current, -1: autopilot does not measure the current"]
6607    pub current_battery: i16,
6608    #[doc = "Battery ID"]
6609    pub id: u8,
6610    #[doc = "Function of the battery"]
6611    pub battery_function: MavBatteryFunction,
6612    #[doc = "Type (chemistry) of the battery"]
6613    pub mavtype: MavBatteryType,
6614    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6615    pub battery_remaining: i8,
6616    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6618    pub time_remaining: i32,
6619    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6620    #[cfg_attr(feature = "serde", serde(default))]
6621    pub charge_state: MavBatteryChargeState,
6622    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6623    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6624    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6625    pub voltages_ext: [u16; 4],
6626    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6627    #[cfg_attr(feature = "serde", serde(default))]
6628    pub mode: MavBatteryMode,
6629    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6630    #[cfg_attr(feature = "serde", serde(default))]
6631    pub fault_bitmask: MavBatteryFault,
6632}
6633impl BATTERY_STATUS_DATA {
6634    pub const ENCODED_LEN: usize = 54usize;
6635    pub const DEFAULT: Self = Self {
6636        current_consumed: 0_i32,
6637        energy_consumed: 0_i32,
6638        temperature: 0_i16,
6639        voltages: [0_u16; 10usize],
6640        current_battery: 0_i16,
6641        id: 0_u8,
6642        battery_function: MavBatteryFunction::DEFAULT,
6643        mavtype: MavBatteryType::DEFAULT,
6644        battery_remaining: 0_i8,
6645        time_remaining: 0_i32,
6646        charge_state: MavBatteryChargeState::DEFAULT,
6647        voltages_ext: [0_u16; 4usize],
6648        mode: MavBatteryMode::DEFAULT,
6649        fault_bitmask: MavBatteryFault::DEFAULT,
6650    };
6651    #[cfg(feature = "arbitrary")]
6652    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6653        use arbitrary::{Arbitrary, Unstructured};
6654        let mut buf = [0u8; 1024];
6655        rng.fill_bytes(&mut buf);
6656        let mut unstructured = Unstructured::new(&buf);
6657        Self::arbitrary(&mut unstructured).unwrap_or_default()
6658    }
6659}
6660impl Default for BATTERY_STATUS_DATA {
6661    fn default() -> Self {
6662        Self::DEFAULT.clone()
6663    }
6664}
6665impl MessageData for BATTERY_STATUS_DATA {
6666    type Message = MavMessage;
6667    const ID: u32 = 147u32;
6668    const NAME: &'static str = "BATTERY_STATUS";
6669    const EXTRA_CRC: u8 = 154u8;
6670    const ENCODED_LEN: usize = 54usize;
6671    fn deser(
6672        _version: MavlinkVersion,
6673        __input: &[u8],
6674    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6675        let avail_len = __input.len();
6676        let mut payload_buf = [0; Self::ENCODED_LEN];
6677        let mut buf = if avail_len < Self::ENCODED_LEN {
6678            payload_buf[0..avail_len].copy_from_slice(__input);
6679            Bytes::new(&payload_buf)
6680        } else {
6681            Bytes::new(__input)
6682        };
6683        let mut __struct = Self::default();
6684        __struct.current_consumed = buf.get_i32_le();
6685        __struct.energy_consumed = buf.get_i32_le();
6686        __struct.temperature = buf.get_i16_le();
6687        for v in &mut __struct.voltages {
6688            let val = buf.get_u16_le();
6689            *v = val;
6690        }
6691        __struct.current_battery = buf.get_i16_le();
6692        __struct.id = buf.get_u8();
6693        let tmp = buf.get_u8();
6694        __struct.battery_function =
6695            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6696                enum_type: "MavBatteryFunction",
6697                value: tmp as u32,
6698            })?;
6699        let tmp = buf.get_u8();
6700        __struct.mavtype =
6701            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6702                enum_type: "MavBatteryType",
6703                value: tmp as u32,
6704            })?;
6705        __struct.battery_remaining = buf.get_i8();
6706        __struct.time_remaining = buf.get_i32_le();
6707        let tmp = buf.get_u8();
6708        __struct.charge_state =
6709            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6710                enum_type: "MavBatteryChargeState",
6711                value: tmp as u32,
6712            })?;
6713        for v in &mut __struct.voltages_ext {
6714            let val = buf.get_u16_le();
6715            *v = val;
6716        }
6717        let tmp = buf.get_u8();
6718        __struct.mode =
6719            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6720                enum_type: "MavBatteryMode",
6721                value: tmp as u32,
6722            })?;
6723        let tmp = buf.get_u32_le();
6724        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6725            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6726                flag_type: "MavBatteryFault",
6727                value: tmp as u32,
6728            })?;
6729        Ok(__struct)
6730    }
6731    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6732        let mut __tmp = BytesMut::new(bytes);
6733        #[allow(clippy::absurd_extreme_comparisons)]
6734        #[allow(unused_comparisons)]
6735        if __tmp.remaining() < Self::ENCODED_LEN {
6736            panic!(
6737                "buffer is too small (need {} bytes, but got {})",
6738                Self::ENCODED_LEN,
6739                __tmp.remaining(),
6740            )
6741        }
6742        __tmp.put_i32_le(self.current_consumed);
6743        __tmp.put_i32_le(self.energy_consumed);
6744        __tmp.put_i16_le(self.temperature);
6745        for val in &self.voltages {
6746            __tmp.put_u16_le(*val);
6747        }
6748        __tmp.put_i16_le(self.current_battery);
6749        __tmp.put_u8(self.id);
6750        __tmp.put_u8(self.battery_function as u8);
6751        __tmp.put_u8(self.mavtype as u8);
6752        __tmp.put_i8(self.battery_remaining);
6753        __tmp.put_i32_le(self.time_remaining);
6754        __tmp.put_u8(self.charge_state as u8);
6755        for val in &self.voltages_ext {
6756            __tmp.put_u16_le(*val);
6757        }
6758        __tmp.put_u8(self.mode as u8);
6759        __tmp.put_u32_le(self.fault_bitmask.bits());
6760        if matches!(version, MavlinkVersion::V2) {
6761            let len = __tmp.len();
6762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6763        } else {
6764            __tmp.len()
6765        }
6766    }
6767}
6768#[doc = "Report button state change."]
6769#[doc = ""]
6770#[doc = "ID: 257"]
6771#[derive(Debug, Clone, PartialEq)]
6772#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6773#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6774pub struct BUTTON_CHANGE_DATA {
6775    #[doc = "Timestamp (time since system boot)."]
6776    pub time_boot_ms: u32,
6777    #[doc = "Time of last change of button state."]
6778    pub last_change_ms: u32,
6779    #[doc = "Bitmap for state of buttons."]
6780    pub state: u8,
6781}
6782impl BUTTON_CHANGE_DATA {
6783    pub const ENCODED_LEN: usize = 9usize;
6784    pub const DEFAULT: Self = Self {
6785        time_boot_ms: 0_u32,
6786        last_change_ms: 0_u32,
6787        state: 0_u8,
6788    };
6789    #[cfg(feature = "arbitrary")]
6790    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6791        use arbitrary::{Arbitrary, Unstructured};
6792        let mut buf = [0u8; 1024];
6793        rng.fill_bytes(&mut buf);
6794        let mut unstructured = Unstructured::new(&buf);
6795        Self::arbitrary(&mut unstructured).unwrap_or_default()
6796    }
6797}
6798impl Default for BUTTON_CHANGE_DATA {
6799    fn default() -> Self {
6800        Self::DEFAULT.clone()
6801    }
6802}
6803impl MessageData for BUTTON_CHANGE_DATA {
6804    type Message = MavMessage;
6805    const ID: u32 = 257u32;
6806    const NAME: &'static str = "BUTTON_CHANGE";
6807    const EXTRA_CRC: u8 = 131u8;
6808    const ENCODED_LEN: usize = 9usize;
6809    fn deser(
6810        _version: MavlinkVersion,
6811        __input: &[u8],
6812    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6813        let avail_len = __input.len();
6814        let mut payload_buf = [0; Self::ENCODED_LEN];
6815        let mut buf = if avail_len < Self::ENCODED_LEN {
6816            payload_buf[0..avail_len].copy_from_slice(__input);
6817            Bytes::new(&payload_buf)
6818        } else {
6819            Bytes::new(__input)
6820        };
6821        let mut __struct = Self::default();
6822        __struct.time_boot_ms = buf.get_u32_le();
6823        __struct.last_change_ms = buf.get_u32_le();
6824        __struct.state = buf.get_u8();
6825        Ok(__struct)
6826    }
6827    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6828        let mut __tmp = BytesMut::new(bytes);
6829        #[allow(clippy::absurd_extreme_comparisons)]
6830        #[allow(unused_comparisons)]
6831        if __tmp.remaining() < Self::ENCODED_LEN {
6832            panic!(
6833                "buffer is too small (need {} bytes, but got {})",
6834                Self::ENCODED_LEN,
6835                __tmp.remaining(),
6836            )
6837        }
6838        __tmp.put_u32_le(self.time_boot_ms);
6839        __tmp.put_u32_le(self.last_change_ms);
6840        __tmp.put_u8(self.state);
6841        if matches!(version, MavlinkVersion::V2) {
6842            let len = __tmp.len();
6843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6844        } else {
6845            __tmp.len()
6846        }
6847    }
6848}
6849#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6850#[doc = ""]
6851#[doc = "ID: 262"]
6852#[derive(Debug, Clone, PartialEq)]
6853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6855pub struct CAMERA_CAPTURE_STATUS_DATA {
6856    #[doc = "Timestamp (time since system boot)."]
6857    pub time_boot_ms: u32,
6858    #[doc = "Image capture interval"]
6859    pub image_interval: f32,
6860    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6861    pub recording_time_ms: u32,
6862    #[doc = "Available storage capacity."]
6863    pub available_capacity: f32,
6864    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6865    pub image_status: u8,
6866    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6867    pub video_status: u8,
6868    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6869    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6870    pub image_count: i32,
6871    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6872    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6873    pub camera_device_id: u8,
6874}
6875impl CAMERA_CAPTURE_STATUS_DATA {
6876    pub const ENCODED_LEN: usize = 23usize;
6877    pub const DEFAULT: Self = Self {
6878        time_boot_ms: 0_u32,
6879        image_interval: 0.0_f32,
6880        recording_time_ms: 0_u32,
6881        available_capacity: 0.0_f32,
6882        image_status: 0_u8,
6883        video_status: 0_u8,
6884        image_count: 0_i32,
6885        camera_device_id: 0_u8,
6886    };
6887    #[cfg(feature = "arbitrary")]
6888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6889        use arbitrary::{Arbitrary, Unstructured};
6890        let mut buf = [0u8; 1024];
6891        rng.fill_bytes(&mut buf);
6892        let mut unstructured = Unstructured::new(&buf);
6893        Self::arbitrary(&mut unstructured).unwrap_or_default()
6894    }
6895}
6896impl Default for CAMERA_CAPTURE_STATUS_DATA {
6897    fn default() -> Self {
6898        Self::DEFAULT.clone()
6899    }
6900}
6901impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6902    type Message = MavMessage;
6903    const ID: u32 = 262u32;
6904    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6905    const EXTRA_CRC: u8 = 12u8;
6906    const ENCODED_LEN: usize = 23usize;
6907    fn deser(
6908        _version: MavlinkVersion,
6909        __input: &[u8],
6910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6911        let avail_len = __input.len();
6912        let mut payload_buf = [0; Self::ENCODED_LEN];
6913        let mut buf = if avail_len < Self::ENCODED_LEN {
6914            payload_buf[0..avail_len].copy_from_slice(__input);
6915            Bytes::new(&payload_buf)
6916        } else {
6917            Bytes::new(__input)
6918        };
6919        let mut __struct = Self::default();
6920        __struct.time_boot_ms = buf.get_u32_le();
6921        __struct.image_interval = buf.get_f32_le();
6922        __struct.recording_time_ms = buf.get_u32_le();
6923        __struct.available_capacity = buf.get_f32_le();
6924        __struct.image_status = buf.get_u8();
6925        __struct.video_status = buf.get_u8();
6926        __struct.image_count = buf.get_i32_le();
6927        __struct.camera_device_id = buf.get_u8();
6928        Ok(__struct)
6929    }
6930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6931        let mut __tmp = BytesMut::new(bytes);
6932        #[allow(clippy::absurd_extreme_comparisons)]
6933        #[allow(unused_comparisons)]
6934        if __tmp.remaining() < Self::ENCODED_LEN {
6935            panic!(
6936                "buffer is too small (need {} bytes, but got {})",
6937                Self::ENCODED_LEN,
6938                __tmp.remaining(),
6939            )
6940        }
6941        __tmp.put_u32_le(self.time_boot_ms);
6942        __tmp.put_f32_le(self.image_interval);
6943        __tmp.put_u32_le(self.recording_time_ms);
6944        __tmp.put_f32_le(self.available_capacity);
6945        __tmp.put_u8(self.image_status);
6946        __tmp.put_u8(self.video_status);
6947        __tmp.put_i32_le(self.image_count);
6948        __tmp.put_u8(self.camera_device_id);
6949        if matches!(version, MavlinkVersion::V2) {
6950            let len = __tmp.len();
6951            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6952        } else {
6953            __tmp.len()
6954        }
6955    }
6956}
6957#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6958#[doc = ""]
6959#[doc = "ID: 271"]
6960#[derive(Debug, Clone, PartialEq)]
6961#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6962#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6963pub struct CAMERA_FOV_STATUS_DATA {
6964    #[doc = "Timestamp (time since system boot)."]
6965    pub time_boot_ms: u32,
6966    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6967    pub lat_camera: i32,
6968    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6969    pub lon_camera: i32,
6970    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6971    pub alt_camera: i32,
6972    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6973    pub lat_image: i32,
6974    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6975    pub lon_image: i32,
6976    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6977    pub alt_image: i32,
6978    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6979    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6980    pub q: [f32; 4],
6981    #[doc = "Horizontal field of view (NaN if unknown)."]
6982    pub hfov: f32,
6983    #[doc = "Vertical field of view (NaN if unknown)."]
6984    pub vfov: f32,
6985    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6986    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6987    pub camera_device_id: u8,
6988}
6989impl CAMERA_FOV_STATUS_DATA {
6990    pub const ENCODED_LEN: usize = 53usize;
6991    pub const DEFAULT: Self = Self {
6992        time_boot_ms: 0_u32,
6993        lat_camera: 0_i32,
6994        lon_camera: 0_i32,
6995        alt_camera: 0_i32,
6996        lat_image: 0_i32,
6997        lon_image: 0_i32,
6998        alt_image: 0_i32,
6999        q: [0.0_f32; 4usize],
7000        hfov: 0.0_f32,
7001        vfov: 0.0_f32,
7002        camera_device_id: 0_u8,
7003    };
7004    #[cfg(feature = "arbitrary")]
7005    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7006        use arbitrary::{Arbitrary, Unstructured};
7007        let mut buf = [0u8; 1024];
7008        rng.fill_bytes(&mut buf);
7009        let mut unstructured = Unstructured::new(&buf);
7010        Self::arbitrary(&mut unstructured).unwrap_or_default()
7011    }
7012}
7013impl Default for CAMERA_FOV_STATUS_DATA {
7014    fn default() -> Self {
7015        Self::DEFAULT.clone()
7016    }
7017}
7018impl MessageData for CAMERA_FOV_STATUS_DATA {
7019    type Message = MavMessage;
7020    const ID: u32 = 271u32;
7021    const NAME: &'static str = "CAMERA_FOV_STATUS";
7022    const EXTRA_CRC: u8 = 22u8;
7023    const ENCODED_LEN: usize = 53usize;
7024    fn deser(
7025        _version: MavlinkVersion,
7026        __input: &[u8],
7027    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7028        let avail_len = __input.len();
7029        let mut payload_buf = [0; Self::ENCODED_LEN];
7030        let mut buf = if avail_len < Self::ENCODED_LEN {
7031            payload_buf[0..avail_len].copy_from_slice(__input);
7032            Bytes::new(&payload_buf)
7033        } else {
7034            Bytes::new(__input)
7035        };
7036        let mut __struct = Self::default();
7037        __struct.time_boot_ms = buf.get_u32_le();
7038        __struct.lat_camera = buf.get_i32_le();
7039        __struct.lon_camera = buf.get_i32_le();
7040        __struct.alt_camera = buf.get_i32_le();
7041        __struct.lat_image = buf.get_i32_le();
7042        __struct.lon_image = buf.get_i32_le();
7043        __struct.alt_image = buf.get_i32_le();
7044        for v in &mut __struct.q {
7045            let val = buf.get_f32_le();
7046            *v = val;
7047        }
7048        __struct.hfov = buf.get_f32_le();
7049        __struct.vfov = buf.get_f32_le();
7050        __struct.camera_device_id = buf.get_u8();
7051        Ok(__struct)
7052    }
7053    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7054        let mut __tmp = BytesMut::new(bytes);
7055        #[allow(clippy::absurd_extreme_comparisons)]
7056        #[allow(unused_comparisons)]
7057        if __tmp.remaining() < Self::ENCODED_LEN {
7058            panic!(
7059                "buffer is too small (need {} bytes, but got {})",
7060                Self::ENCODED_LEN,
7061                __tmp.remaining(),
7062            )
7063        }
7064        __tmp.put_u32_le(self.time_boot_ms);
7065        __tmp.put_i32_le(self.lat_camera);
7066        __tmp.put_i32_le(self.lon_camera);
7067        __tmp.put_i32_le(self.alt_camera);
7068        __tmp.put_i32_le(self.lat_image);
7069        __tmp.put_i32_le(self.lon_image);
7070        __tmp.put_i32_le(self.alt_image);
7071        for val in &self.q {
7072            __tmp.put_f32_le(*val);
7073        }
7074        __tmp.put_f32_le(self.hfov);
7075        __tmp.put_f32_le(self.vfov);
7076        __tmp.put_u8(self.camera_device_id);
7077        if matches!(version, MavlinkVersion::V2) {
7078            let len = __tmp.len();
7079            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7080        } else {
7081            __tmp.len()
7082        }
7083    }
7084}
7085#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
7086#[doc = ""]
7087#[doc = "ID: 263"]
7088#[derive(Debug, Clone, PartialEq)]
7089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7091pub struct CAMERA_IMAGE_CAPTURED_DATA {
7092    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
7093    pub time_utc: u64,
7094    #[doc = "Timestamp (time since system boot)."]
7095    pub time_boot_ms: u32,
7096    #[doc = "Latitude where image was taken"]
7097    pub lat: i32,
7098    #[doc = "Longitude where capture was taken"]
7099    pub lon: i32,
7100    #[doc = "Altitude (MSL) where image was taken"]
7101    pub alt: i32,
7102    #[doc = "Altitude above ground"]
7103    pub relative_alt: i32,
7104    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
7105    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7106    pub q: [f32; 4],
7107    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
7108    pub image_index: i32,
7109    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
7110    pub camera_id: u8,
7111    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
7112    pub capture_result: i8,
7113    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
7114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7115    pub file_url: [u8; 205],
7116}
7117impl CAMERA_IMAGE_CAPTURED_DATA {
7118    pub const ENCODED_LEN: usize = 255usize;
7119    pub const DEFAULT: Self = Self {
7120        time_utc: 0_u64,
7121        time_boot_ms: 0_u32,
7122        lat: 0_i32,
7123        lon: 0_i32,
7124        alt: 0_i32,
7125        relative_alt: 0_i32,
7126        q: [0.0_f32; 4usize],
7127        image_index: 0_i32,
7128        camera_id: 0_u8,
7129        capture_result: 0_i8,
7130        file_url: [0_u8; 205usize],
7131    };
7132    #[cfg(feature = "arbitrary")]
7133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7134        use arbitrary::{Arbitrary, Unstructured};
7135        let mut buf = [0u8; 1024];
7136        rng.fill_bytes(&mut buf);
7137        let mut unstructured = Unstructured::new(&buf);
7138        Self::arbitrary(&mut unstructured).unwrap_or_default()
7139    }
7140}
7141impl Default for CAMERA_IMAGE_CAPTURED_DATA {
7142    fn default() -> Self {
7143        Self::DEFAULT.clone()
7144    }
7145}
7146impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
7147    type Message = MavMessage;
7148    const ID: u32 = 263u32;
7149    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
7150    const EXTRA_CRC: u8 = 133u8;
7151    const ENCODED_LEN: usize = 255usize;
7152    fn deser(
7153        _version: MavlinkVersion,
7154        __input: &[u8],
7155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7156        let avail_len = __input.len();
7157        let mut payload_buf = [0; Self::ENCODED_LEN];
7158        let mut buf = if avail_len < Self::ENCODED_LEN {
7159            payload_buf[0..avail_len].copy_from_slice(__input);
7160            Bytes::new(&payload_buf)
7161        } else {
7162            Bytes::new(__input)
7163        };
7164        let mut __struct = Self::default();
7165        __struct.time_utc = buf.get_u64_le();
7166        __struct.time_boot_ms = buf.get_u32_le();
7167        __struct.lat = buf.get_i32_le();
7168        __struct.lon = buf.get_i32_le();
7169        __struct.alt = buf.get_i32_le();
7170        __struct.relative_alt = buf.get_i32_le();
7171        for v in &mut __struct.q {
7172            let val = buf.get_f32_le();
7173            *v = val;
7174        }
7175        __struct.image_index = buf.get_i32_le();
7176        __struct.camera_id = buf.get_u8();
7177        __struct.capture_result = buf.get_i8();
7178        for v in &mut __struct.file_url {
7179            let val = buf.get_u8();
7180            *v = val;
7181        }
7182        Ok(__struct)
7183    }
7184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7185        let mut __tmp = BytesMut::new(bytes);
7186        #[allow(clippy::absurd_extreme_comparisons)]
7187        #[allow(unused_comparisons)]
7188        if __tmp.remaining() < Self::ENCODED_LEN {
7189            panic!(
7190                "buffer is too small (need {} bytes, but got {})",
7191                Self::ENCODED_LEN,
7192                __tmp.remaining(),
7193            )
7194        }
7195        __tmp.put_u64_le(self.time_utc);
7196        __tmp.put_u32_le(self.time_boot_ms);
7197        __tmp.put_i32_le(self.lat);
7198        __tmp.put_i32_le(self.lon);
7199        __tmp.put_i32_le(self.alt);
7200        __tmp.put_i32_le(self.relative_alt);
7201        for val in &self.q {
7202            __tmp.put_f32_le(*val);
7203        }
7204        __tmp.put_i32_le(self.image_index);
7205        __tmp.put_u8(self.camera_id);
7206        __tmp.put_i8(self.capture_result);
7207        for val in &self.file_url {
7208            __tmp.put_u8(*val);
7209        }
7210        if matches!(version, MavlinkVersion::V2) {
7211            let len = __tmp.len();
7212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7213        } else {
7214            __tmp.len()
7215        }
7216    }
7217}
7218#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7219#[doc = ""]
7220#[doc = "ID: 259"]
7221#[derive(Debug, Clone, PartialEq)]
7222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7224pub struct CAMERA_INFORMATION_DATA {
7225    #[doc = "Timestamp (time since system boot)."]
7226    pub time_boot_ms: u32,
7227    #[doc = "0xff). Use 0 if not known."]
7228    pub firmware_version: u32,
7229    #[doc = "Focal length. Use NaN if not known."]
7230    pub focal_length: f32,
7231    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7232    pub sensor_size_h: f32,
7233    #[doc = "Image sensor size vertical. Use NaN if not known."]
7234    pub sensor_size_v: f32,
7235    #[doc = "Bitmap of camera capability flags."]
7236    pub flags: CameraCapFlags,
7237    #[doc = "Horizontal image resolution. Use 0 if not known."]
7238    pub resolution_h: u16,
7239    #[doc = "Vertical image resolution. Use 0 if not known."]
7240    pub resolution_v: u16,
7241    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7242    pub cam_definition_version: u16,
7243    #[doc = "Name of the camera vendor"]
7244    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7245    pub vendor_name: [u8; 32],
7246    #[doc = "Name of the camera model"]
7247    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7248    pub model_name: [u8; 32],
7249    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7250    pub lens_id: u8,
7251    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7253    pub cam_definition_uri: [u8; 140],
7254    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7255    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7256    pub gimbal_device_id: u8,
7257    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7258    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7259    pub camera_device_id: u8,
7260}
7261impl CAMERA_INFORMATION_DATA {
7262    pub const ENCODED_LEN: usize = 237usize;
7263    pub const DEFAULT: Self = Self {
7264        time_boot_ms: 0_u32,
7265        firmware_version: 0_u32,
7266        focal_length: 0.0_f32,
7267        sensor_size_h: 0.0_f32,
7268        sensor_size_v: 0.0_f32,
7269        flags: CameraCapFlags::DEFAULT,
7270        resolution_h: 0_u16,
7271        resolution_v: 0_u16,
7272        cam_definition_version: 0_u16,
7273        vendor_name: [0_u8; 32usize],
7274        model_name: [0_u8; 32usize],
7275        lens_id: 0_u8,
7276        cam_definition_uri: [0_u8; 140usize],
7277        gimbal_device_id: 0_u8,
7278        camera_device_id: 0_u8,
7279    };
7280    #[cfg(feature = "arbitrary")]
7281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7282        use arbitrary::{Arbitrary, Unstructured};
7283        let mut buf = [0u8; 1024];
7284        rng.fill_bytes(&mut buf);
7285        let mut unstructured = Unstructured::new(&buf);
7286        Self::arbitrary(&mut unstructured).unwrap_or_default()
7287    }
7288}
7289impl Default for CAMERA_INFORMATION_DATA {
7290    fn default() -> Self {
7291        Self::DEFAULT.clone()
7292    }
7293}
7294impl MessageData for CAMERA_INFORMATION_DATA {
7295    type Message = MavMessage;
7296    const ID: u32 = 259u32;
7297    const NAME: &'static str = "CAMERA_INFORMATION";
7298    const EXTRA_CRC: u8 = 92u8;
7299    const ENCODED_LEN: usize = 237usize;
7300    fn deser(
7301        _version: MavlinkVersion,
7302        __input: &[u8],
7303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7304        let avail_len = __input.len();
7305        let mut payload_buf = [0; Self::ENCODED_LEN];
7306        let mut buf = if avail_len < Self::ENCODED_LEN {
7307            payload_buf[0..avail_len].copy_from_slice(__input);
7308            Bytes::new(&payload_buf)
7309        } else {
7310            Bytes::new(__input)
7311        };
7312        let mut __struct = Self::default();
7313        __struct.time_boot_ms = buf.get_u32_le();
7314        __struct.firmware_version = buf.get_u32_le();
7315        __struct.focal_length = buf.get_f32_le();
7316        __struct.sensor_size_h = buf.get_f32_le();
7317        __struct.sensor_size_v = buf.get_f32_le();
7318        let tmp = buf.get_u32_le();
7319        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7320            ::mavlink_core::error::ParserError::InvalidFlag {
7321                flag_type: "CameraCapFlags",
7322                value: tmp as u32,
7323            },
7324        )?;
7325        __struct.resolution_h = buf.get_u16_le();
7326        __struct.resolution_v = buf.get_u16_le();
7327        __struct.cam_definition_version = buf.get_u16_le();
7328        for v in &mut __struct.vendor_name {
7329            let val = buf.get_u8();
7330            *v = val;
7331        }
7332        for v in &mut __struct.model_name {
7333            let val = buf.get_u8();
7334            *v = val;
7335        }
7336        __struct.lens_id = buf.get_u8();
7337        for v in &mut __struct.cam_definition_uri {
7338            let val = buf.get_u8();
7339            *v = val;
7340        }
7341        __struct.gimbal_device_id = buf.get_u8();
7342        __struct.camera_device_id = buf.get_u8();
7343        Ok(__struct)
7344    }
7345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7346        let mut __tmp = BytesMut::new(bytes);
7347        #[allow(clippy::absurd_extreme_comparisons)]
7348        #[allow(unused_comparisons)]
7349        if __tmp.remaining() < Self::ENCODED_LEN {
7350            panic!(
7351                "buffer is too small (need {} bytes, but got {})",
7352                Self::ENCODED_LEN,
7353                __tmp.remaining(),
7354            )
7355        }
7356        __tmp.put_u32_le(self.time_boot_ms);
7357        __tmp.put_u32_le(self.firmware_version);
7358        __tmp.put_f32_le(self.focal_length);
7359        __tmp.put_f32_le(self.sensor_size_h);
7360        __tmp.put_f32_le(self.sensor_size_v);
7361        __tmp.put_u32_le(self.flags.bits());
7362        __tmp.put_u16_le(self.resolution_h);
7363        __tmp.put_u16_le(self.resolution_v);
7364        __tmp.put_u16_le(self.cam_definition_version);
7365        for val in &self.vendor_name {
7366            __tmp.put_u8(*val);
7367        }
7368        for val in &self.model_name {
7369            __tmp.put_u8(*val);
7370        }
7371        __tmp.put_u8(self.lens_id);
7372        for val in &self.cam_definition_uri {
7373            __tmp.put_u8(*val);
7374        }
7375        __tmp.put_u8(self.gimbal_device_id);
7376        __tmp.put_u8(self.camera_device_id);
7377        if matches!(version, MavlinkVersion::V2) {
7378            let len = __tmp.len();
7379            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7380        } else {
7381            __tmp.len()
7382        }
7383    }
7384}
7385#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7386#[doc = ""]
7387#[doc = "ID: 260"]
7388#[derive(Debug, Clone, PartialEq)]
7389#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7390#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7391pub struct CAMERA_SETTINGS_DATA {
7392    #[doc = "Timestamp (time since system boot)."]
7393    pub time_boot_ms: u32,
7394    #[doc = "Camera mode"]
7395    pub mode_id: CameraMode,
7396    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7398    pub zoomLevel: f32,
7399    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7401    pub focusLevel: f32,
7402    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7404    pub camera_device_id: u8,
7405}
7406impl CAMERA_SETTINGS_DATA {
7407    pub const ENCODED_LEN: usize = 14usize;
7408    pub const DEFAULT: Self = Self {
7409        time_boot_ms: 0_u32,
7410        mode_id: CameraMode::DEFAULT,
7411        zoomLevel: 0.0_f32,
7412        focusLevel: 0.0_f32,
7413        camera_device_id: 0_u8,
7414    };
7415    #[cfg(feature = "arbitrary")]
7416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7417        use arbitrary::{Arbitrary, Unstructured};
7418        let mut buf = [0u8; 1024];
7419        rng.fill_bytes(&mut buf);
7420        let mut unstructured = Unstructured::new(&buf);
7421        Self::arbitrary(&mut unstructured).unwrap_or_default()
7422    }
7423}
7424impl Default for CAMERA_SETTINGS_DATA {
7425    fn default() -> Self {
7426        Self::DEFAULT.clone()
7427    }
7428}
7429impl MessageData for CAMERA_SETTINGS_DATA {
7430    type Message = MavMessage;
7431    const ID: u32 = 260u32;
7432    const NAME: &'static str = "CAMERA_SETTINGS";
7433    const EXTRA_CRC: u8 = 146u8;
7434    const ENCODED_LEN: usize = 14usize;
7435    fn deser(
7436        _version: MavlinkVersion,
7437        __input: &[u8],
7438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7439        let avail_len = __input.len();
7440        let mut payload_buf = [0; Self::ENCODED_LEN];
7441        let mut buf = if avail_len < Self::ENCODED_LEN {
7442            payload_buf[0..avail_len].copy_from_slice(__input);
7443            Bytes::new(&payload_buf)
7444        } else {
7445            Bytes::new(__input)
7446        };
7447        let mut __struct = Self::default();
7448        __struct.time_boot_ms = buf.get_u32_le();
7449        let tmp = buf.get_u8();
7450        __struct.mode_id =
7451            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7452                enum_type: "CameraMode",
7453                value: tmp as u32,
7454            })?;
7455        __struct.zoomLevel = buf.get_f32_le();
7456        __struct.focusLevel = buf.get_f32_le();
7457        __struct.camera_device_id = buf.get_u8();
7458        Ok(__struct)
7459    }
7460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7461        let mut __tmp = BytesMut::new(bytes);
7462        #[allow(clippy::absurd_extreme_comparisons)]
7463        #[allow(unused_comparisons)]
7464        if __tmp.remaining() < Self::ENCODED_LEN {
7465            panic!(
7466                "buffer is too small (need {} bytes, but got {})",
7467                Self::ENCODED_LEN,
7468                __tmp.remaining(),
7469            )
7470        }
7471        __tmp.put_u32_le(self.time_boot_ms);
7472        __tmp.put_u8(self.mode_id as u8);
7473        __tmp.put_f32_le(self.zoomLevel);
7474        __tmp.put_f32_le(self.focusLevel);
7475        __tmp.put_u8(self.camera_device_id);
7476        if matches!(version, MavlinkVersion::V2) {
7477            let len = __tmp.len();
7478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7479        } else {
7480            __tmp.len()
7481        }
7482    }
7483}
7484#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7485#[doc = ""]
7486#[doc = "ID: 277"]
7487#[derive(Debug, Clone, PartialEq)]
7488#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7489#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7490pub struct CAMERA_THERMAL_RANGE_DATA {
7491    #[doc = "Timestamp (time since system boot)."]
7492    pub time_boot_ms: u32,
7493    #[doc = "Temperature max."]
7494    pub max: f32,
7495    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7496    pub max_point_x: f32,
7497    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7498    pub max_point_y: f32,
7499    #[doc = "Temperature min."]
7500    pub min: f32,
7501    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7502    pub min_point_x: f32,
7503    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7504    pub min_point_y: f32,
7505    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7506    pub stream_id: u8,
7507    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7508    pub camera_device_id: u8,
7509}
7510impl CAMERA_THERMAL_RANGE_DATA {
7511    pub const ENCODED_LEN: usize = 30usize;
7512    pub const DEFAULT: Self = Self {
7513        time_boot_ms: 0_u32,
7514        max: 0.0_f32,
7515        max_point_x: 0.0_f32,
7516        max_point_y: 0.0_f32,
7517        min: 0.0_f32,
7518        min_point_x: 0.0_f32,
7519        min_point_y: 0.0_f32,
7520        stream_id: 0_u8,
7521        camera_device_id: 0_u8,
7522    };
7523    #[cfg(feature = "arbitrary")]
7524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7525        use arbitrary::{Arbitrary, Unstructured};
7526        let mut buf = [0u8; 1024];
7527        rng.fill_bytes(&mut buf);
7528        let mut unstructured = Unstructured::new(&buf);
7529        Self::arbitrary(&mut unstructured).unwrap_or_default()
7530    }
7531}
7532impl Default for CAMERA_THERMAL_RANGE_DATA {
7533    fn default() -> Self {
7534        Self::DEFAULT.clone()
7535    }
7536}
7537impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7538    type Message = MavMessage;
7539    const ID: u32 = 277u32;
7540    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7541    const EXTRA_CRC: u8 = 62u8;
7542    const ENCODED_LEN: usize = 30usize;
7543    fn deser(
7544        _version: MavlinkVersion,
7545        __input: &[u8],
7546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7547        let avail_len = __input.len();
7548        let mut payload_buf = [0; Self::ENCODED_LEN];
7549        let mut buf = if avail_len < Self::ENCODED_LEN {
7550            payload_buf[0..avail_len].copy_from_slice(__input);
7551            Bytes::new(&payload_buf)
7552        } else {
7553            Bytes::new(__input)
7554        };
7555        let mut __struct = Self::default();
7556        __struct.time_boot_ms = buf.get_u32_le();
7557        __struct.max = buf.get_f32_le();
7558        __struct.max_point_x = buf.get_f32_le();
7559        __struct.max_point_y = buf.get_f32_le();
7560        __struct.min = buf.get_f32_le();
7561        __struct.min_point_x = buf.get_f32_le();
7562        __struct.min_point_y = buf.get_f32_le();
7563        __struct.stream_id = buf.get_u8();
7564        __struct.camera_device_id = buf.get_u8();
7565        Ok(__struct)
7566    }
7567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7568        let mut __tmp = BytesMut::new(bytes);
7569        #[allow(clippy::absurd_extreme_comparisons)]
7570        #[allow(unused_comparisons)]
7571        if __tmp.remaining() < Self::ENCODED_LEN {
7572            panic!(
7573                "buffer is too small (need {} bytes, but got {})",
7574                Self::ENCODED_LEN,
7575                __tmp.remaining(),
7576            )
7577        }
7578        __tmp.put_u32_le(self.time_boot_ms);
7579        __tmp.put_f32_le(self.max);
7580        __tmp.put_f32_le(self.max_point_x);
7581        __tmp.put_f32_le(self.max_point_y);
7582        __tmp.put_f32_le(self.min);
7583        __tmp.put_f32_le(self.min_point_x);
7584        __tmp.put_f32_le(self.min_point_y);
7585        __tmp.put_u8(self.stream_id);
7586        __tmp.put_u8(self.camera_device_id);
7587        if matches!(version, MavlinkVersion::V2) {
7588            let len = __tmp.len();
7589            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7590        } else {
7591            __tmp.len()
7592        }
7593    }
7594}
7595#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7596#[doc = ""]
7597#[doc = "ID: 276"]
7598#[derive(Debug, Clone, PartialEq)]
7599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7601pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7602    #[doc = "Latitude of tracked object"]
7603    pub lat: i32,
7604    #[doc = "Longitude of tracked object"]
7605    pub lon: i32,
7606    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7607    pub alt: f32,
7608    #[doc = "Horizontal accuracy. NAN if unknown"]
7609    pub h_acc: f32,
7610    #[doc = "Vertical accuracy. NAN if unknown"]
7611    pub v_acc: f32,
7612    #[doc = "North velocity of tracked object. NAN if unknown"]
7613    pub vel_n: f32,
7614    #[doc = "East velocity of tracked object. NAN if unknown"]
7615    pub vel_e: f32,
7616    #[doc = "Down velocity of tracked object. NAN if unknown"]
7617    pub vel_d: f32,
7618    #[doc = "Velocity accuracy. NAN if unknown"]
7619    pub vel_acc: f32,
7620    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7621    pub dist: f32,
7622    #[doc = "Heading in radians, in NED. NAN if unknown"]
7623    pub hdg: f32,
7624    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7625    pub hdg_acc: f32,
7626    #[doc = "Current tracking status"]
7627    pub tracking_status: CameraTrackingStatusFlags,
7628    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7629    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7630    pub camera_device_id: u8,
7631}
7632impl CAMERA_TRACKING_GEO_STATUS_DATA {
7633    pub const ENCODED_LEN: usize = 50usize;
7634    pub const DEFAULT: Self = Self {
7635        lat: 0_i32,
7636        lon: 0_i32,
7637        alt: 0.0_f32,
7638        h_acc: 0.0_f32,
7639        v_acc: 0.0_f32,
7640        vel_n: 0.0_f32,
7641        vel_e: 0.0_f32,
7642        vel_d: 0.0_f32,
7643        vel_acc: 0.0_f32,
7644        dist: 0.0_f32,
7645        hdg: 0.0_f32,
7646        hdg_acc: 0.0_f32,
7647        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7648        camera_device_id: 0_u8,
7649    };
7650    #[cfg(feature = "arbitrary")]
7651    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7652        use arbitrary::{Arbitrary, Unstructured};
7653        let mut buf = [0u8; 1024];
7654        rng.fill_bytes(&mut buf);
7655        let mut unstructured = Unstructured::new(&buf);
7656        Self::arbitrary(&mut unstructured).unwrap_or_default()
7657    }
7658}
7659impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7660    fn default() -> Self {
7661        Self::DEFAULT.clone()
7662    }
7663}
7664impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7665    type Message = MavMessage;
7666    const ID: u32 = 276u32;
7667    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7668    const EXTRA_CRC: u8 = 18u8;
7669    const ENCODED_LEN: usize = 50usize;
7670    fn deser(
7671        _version: MavlinkVersion,
7672        __input: &[u8],
7673    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7674        let avail_len = __input.len();
7675        let mut payload_buf = [0; Self::ENCODED_LEN];
7676        let mut buf = if avail_len < Self::ENCODED_LEN {
7677            payload_buf[0..avail_len].copy_from_slice(__input);
7678            Bytes::new(&payload_buf)
7679        } else {
7680            Bytes::new(__input)
7681        };
7682        let mut __struct = Self::default();
7683        __struct.lat = buf.get_i32_le();
7684        __struct.lon = buf.get_i32_le();
7685        __struct.alt = buf.get_f32_le();
7686        __struct.h_acc = buf.get_f32_le();
7687        __struct.v_acc = buf.get_f32_le();
7688        __struct.vel_n = buf.get_f32_le();
7689        __struct.vel_e = buf.get_f32_le();
7690        __struct.vel_d = buf.get_f32_le();
7691        __struct.vel_acc = buf.get_f32_le();
7692        __struct.dist = buf.get_f32_le();
7693        __struct.hdg = buf.get_f32_le();
7694        __struct.hdg_acc = buf.get_f32_le();
7695        let tmp = buf.get_u8();
7696        __struct.tracking_status =
7697            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7698                enum_type: "CameraTrackingStatusFlags",
7699                value: tmp as u32,
7700            })?;
7701        __struct.camera_device_id = buf.get_u8();
7702        Ok(__struct)
7703    }
7704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7705        let mut __tmp = BytesMut::new(bytes);
7706        #[allow(clippy::absurd_extreme_comparisons)]
7707        #[allow(unused_comparisons)]
7708        if __tmp.remaining() < Self::ENCODED_LEN {
7709            panic!(
7710                "buffer is too small (need {} bytes, but got {})",
7711                Self::ENCODED_LEN,
7712                __tmp.remaining(),
7713            )
7714        }
7715        __tmp.put_i32_le(self.lat);
7716        __tmp.put_i32_le(self.lon);
7717        __tmp.put_f32_le(self.alt);
7718        __tmp.put_f32_le(self.h_acc);
7719        __tmp.put_f32_le(self.v_acc);
7720        __tmp.put_f32_le(self.vel_n);
7721        __tmp.put_f32_le(self.vel_e);
7722        __tmp.put_f32_le(self.vel_d);
7723        __tmp.put_f32_le(self.vel_acc);
7724        __tmp.put_f32_le(self.dist);
7725        __tmp.put_f32_le(self.hdg);
7726        __tmp.put_f32_le(self.hdg_acc);
7727        __tmp.put_u8(self.tracking_status as u8);
7728        __tmp.put_u8(self.camera_device_id);
7729        if matches!(version, MavlinkVersion::V2) {
7730            let len = __tmp.len();
7731            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7732        } else {
7733            __tmp.len()
7734        }
7735    }
7736}
7737#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7738#[doc = ""]
7739#[doc = "ID: 275"]
7740#[derive(Debug, Clone, PartialEq)]
7741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7743pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7744    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7745    pub point_x: f32,
7746    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7747    pub point_y: f32,
7748    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7749    pub radius: f32,
7750    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7751    pub rec_top_x: f32,
7752    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7753    pub rec_top_y: f32,
7754    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7755    pub rec_bottom_x: f32,
7756    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7757    pub rec_bottom_y: f32,
7758    #[doc = "Current tracking status"]
7759    pub tracking_status: CameraTrackingStatusFlags,
7760    #[doc = "Current tracking mode"]
7761    pub tracking_mode: CameraTrackingMode,
7762    #[doc = "Defines location of target data"]
7763    pub target_data: CameraTrackingTargetData,
7764    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7765    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7766    pub camera_device_id: u8,
7767}
7768impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7769    pub const ENCODED_LEN: usize = 32usize;
7770    pub const DEFAULT: Self = Self {
7771        point_x: 0.0_f32,
7772        point_y: 0.0_f32,
7773        radius: 0.0_f32,
7774        rec_top_x: 0.0_f32,
7775        rec_top_y: 0.0_f32,
7776        rec_bottom_x: 0.0_f32,
7777        rec_bottom_y: 0.0_f32,
7778        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7779        tracking_mode: CameraTrackingMode::DEFAULT,
7780        target_data: CameraTrackingTargetData::DEFAULT,
7781        camera_device_id: 0_u8,
7782    };
7783    #[cfg(feature = "arbitrary")]
7784    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7785        use arbitrary::{Arbitrary, Unstructured};
7786        let mut buf = [0u8; 1024];
7787        rng.fill_bytes(&mut buf);
7788        let mut unstructured = Unstructured::new(&buf);
7789        Self::arbitrary(&mut unstructured).unwrap_or_default()
7790    }
7791}
7792impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7793    fn default() -> Self {
7794        Self::DEFAULT.clone()
7795    }
7796}
7797impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7798    type Message = MavMessage;
7799    const ID: u32 = 275u32;
7800    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7801    const EXTRA_CRC: u8 = 126u8;
7802    const ENCODED_LEN: usize = 32usize;
7803    fn deser(
7804        _version: MavlinkVersion,
7805        __input: &[u8],
7806    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7807        let avail_len = __input.len();
7808        let mut payload_buf = [0; Self::ENCODED_LEN];
7809        let mut buf = if avail_len < Self::ENCODED_LEN {
7810            payload_buf[0..avail_len].copy_from_slice(__input);
7811            Bytes::new(&payload_buf)
7812        } else {
7813            Bytes::new(__input)
7814        };
7815        let mut __struct = Self::default();
7816        __struct.point_x = buf.get_f32_le();
7817        __struct.point_y = buf.get_f32_le();
7818        __struct.radius = buf.get_f32_le();
7819        __struct.rec_top_x = buf.get_f32_le();
7820        __struct.rec_top_y = buf.get_f32_le();
7821        __struct.rec_bottom_x = buf.get_f32_le();
7822        __struct.rec_bottom_y = buf.get_f32_le();
7823        let tmp = buf.get_u8();
7824        __struct.tracking_status =
7825            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7826                enum_type: "CameraTrackingStatusFlags",
7827                value: tmp as u32,
7828            })?;
7829        let tmp = buf.get_u8();
7830        __struct.tracking_mode =
7831            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7832                enum_type: "CameraTrackingMode",
7833                value: tmp as u32,
7834            })?;
7835        let tmp = buf.get_u8();
7836        __struct.target_data =
7837            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7838                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7839                    flag_type: "CameraTrackingTargetData",
7840                    value: tmp as u32,
7841                })?;
7842        __struct.camera_device_id = buf.get_u8();
7843        Ok(__struct)
7844    }
7845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7846        let mut __tmp = BytesMut::new(bytes);
7847        #[allow(clippy::absurd_extreme_comparisons)]
7848        #[allow(unused_comparisons)]
7849        if __tmp.remaining() < Self::ENCODED_LEN {
7850            panic!(
7851                "buffer is too small (need {} bytes, but got {})",
7852                Self::ENCODED_LEN,
7853                __tmp.remaining(),
7854            )
7855        }
7856        __tmp.put_f32_le(self.point_x);
7857        __tmp.put_f32_le(self.point_y);
7858        __tmp.put_f32_le(self.radius);
7859        __tmp.put_f32_le(self.rec_top_x);
7860        __tmp.put_f32_le(self.rec_top_y);
7861        __tmp.put_f32_le(self.rec_bottom_x);
7862        __tmp.put_f32_le(self.rec_bottom_y);
7863        __tmp.put_u8(self.tracking_status as u8);
7864        __tmp.put_u8(self.tracking_mode as u8);
7865        __tmp.put_u8(self.target_data.bits());
7866        __tmp.put_u8(self.camera_device_id);
7867        if matches!(version, MavlinkVersion::V2) {
7868            let len = __tmp.len();
7869            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7870        } else {
7871            __tmp.len()
7872        }
7873    }
7874}
7875#[doc = "Camera-IMU triggering and synchronisation message."]
7876#[doc = ""]
7877#[doc = "ID: 112"]
7878#[derive(Debug, Clone, PartialEq)]
7879#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7880#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7881pub struct CAMERA_TRIGGER_DATA {
7882    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7883    pub time_usec: u64,
7884    #[doc = "Image frame sequence"]
7885    pub seq: u32,
7886}
7887impl CAMERA_TRIGGER_DATA {
7888    pub const ENCODED_LEN: usize = 12usize;
7889    pub const DEFAULT: Self = Self {
7890        time_usec: 0_u64,
7891        seq: 0_u32,
7892    };
7893    #[cfg(feature = "arbitrary")]
7894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7895        use arbitrary::{Arbitrary, Unstructured};
7896        let mut buf = [0u8; 1024];
7897        rng.fill_bytes(&mut buf);
7898        let mut unstructured = Unstructured::new(&buf);
7899        Self::arbitrary(&mut unstructured).unwrap_or_default()
7900    }
7901}
7902impl Default for CAMERA_TRIGGER_DATA {
7903    fn default() -> Self {
7904        Self::DEFAULT.clone()
7905    }
7906}
7907impl MessageData for CAMERA_TRIGGER_DATA {
7908    type Message = MavMessage;
7909    const ID: u32 = 112u32;
7910    const NAME: &'static str = "CAMERA_TRIGGER";
7911    const EXTRA_CRC: u8 = 174u8;
7912    const ENCODED_LEN: usize = 12usize;
7913    fn deser(
7914        _version: MavlinkVersion,
7915        __input: &[u8],
7916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7917        let avail_len = __input.len();
7918        let mut payload_buf = [0; Self::ENCODED_LEN];
7919        let mut buf = if avail_len < Self::ENCODED_LEN {
7920            payload_buf[0..avail_len].copy_from_slice(__input);
7921            Bytes::new(&payload_buf)
7922        } else {
7923            Bytes::new(__input)
7924        };
7925        let mut __struct = Self::default();
7926        __struct.time_usec = buf.get_u64_le();
7927        __struct.seq = buf.get_u32_le();
7928        Ok(__struct)
7929    }
7930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7931        let mut __tmp = BytesMut::new(bytes);
7932        #[allow(clippy::absurd_extreme_comparisons)]
7933        #[allow(unused_comparisons)]
7934        if __tmp.remaining() < Self::ENCODED_LEN {
7935            panic!(
7936                "buffer is too small (need {} bytes, but got {})",
7937                Self::ENCODED_LEN,
7938                __tmp.remaining(),
7939            )
7940        }
7941        __tmp.put_u64_le(self.time_usec);
7942        __tmp.put_u32_le(self.seq);
7943        if matches!(version, MavlinkVersion::V2) {
7944            let len = __tmp.len();
7945            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7946        } else {
7947            __tmp.len()
7948        }
7949    }
7950}
7951#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7952#[doc = ""]
7953#[doc = "ID: 387"]
7954#[derive(Debug, Clone, PartialEq)]
7955#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7956#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7957pub struct CANFD_FRAME_DATA {
7958    #[doc = "Frame ID"]
7959    pub id: u32,
7960    #[doc = "System ID."]
7961    pub target_system: u8,
7962    #[doc = "Component ID."]
7963    pub target_component: u8,
7964    #[doc = "bus number"]
7965    pub bus: u8,
7966    #[doc = "Frame length"]
7967    pub len: u8,
7968    #[doc = "Frame data"]
7969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7970    pub data: [u8; 64],
7971}
7972impl CANFD_FRAME_DATA {
7973    pub const ENCODED_LEN: usize = 72usize;
7974    pub const DEFAULT: Self = Self {
7975        id: 0_u32,
7976        target_system: 0_u8,
7977        target_component: 0_u8,
7978        bus: 0_u8,
7979        len: 0_u8,
7980        data: [0_u8; 64usize],
7981    };
7982    #[cfg(feature = "arbitrary")]
7983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7984        use arbitrary::{Arbitrary, Unstructured};
7985        let mut buf = [0u8; 1024];
7986        rng.fill_bytes(&mut buf);
7987        let mut unstructured = Unstructured::new(&buf);
7988        Self::arbitrary(&mut unstructured).unwrap_or_default()
7989    }
7990}
7991impl Default for CANFD_FRAME_DATA {
7992    fn default() -> Self {
7993        Self::DEFAULT.clone()
7994    }
7995}
7996impl MessageData for CANFD_FRAME_DATA {
7997    type Message = MavMessage;
7998    const ID: u32 = 387u32;
7999    const NAME: &'static str = "CANFD_FRAME";
8000    const EXTRA_CRC: u8 = 4u8;
8001    const ENCODED_LEN: usize = 72usize;
8002    fn deser(
8003        _version: MavlinkVersion,
8004        __input: &[u8],
8005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8006        let avail_len = __input.len();
8007        let mut payload_buf = [0; Self::ENCODED_LEN];
8008        let mut buf = if avail_len < Self::ENCODED_LEN {
8009            payload_buf[0..avail_len].copy_from_slice(__input);
8010            Bytes::new(&payload_buf)
8011        } else {
8012            Bytes::new(__input)
8013        };
8014        let mut __struct = Self::default();
8015        __struct.id = buf.get_u32_le();
8016        __struct.target_system = buf.get_u8();
8017        __struct.target_component = buf.get_u8();
8018        __struct.bus = buf.get_u8();
8019        __struct.len = buf.get_u8();
8020        for v in &mut __struct.data {
8021            let val = buf.get_u8();
8022            *v = val;
8023        }
8024        Ok(__struct)
8025    }
8026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8027        let mut __tmp = BytesMut::new(bytes);
8028        #[allow(clippy::absurd_extreme_comparisons)]
8029        #[allow(unused_comparisons)]
8030        if __tmp.remaining() < Self::ENCODED_LEN {
8031            panic!(
8032                "buffer is too small (need {} bytes, but got {})",
8033                Self::ENCODED_LEN,
8034                __tmp.remaining(),
8035            )
8036        }
8037        __tmp.put_u32_le(self.id);
8038        __tmp.put_u8(self.target_system);
8039        __tmp.put_u8(self.target_component);
8040        __tmp.put_u8(self.bus);
8041        __tmp.put_u8(self.len);
8042        for val in &self.data {
8043            __tmp.put_u8(*val);
8044        }
8045        if matches!(version, MavlinkVersion::V2) {
8046            let len = __tmp.len();
8047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8048        } else {
8049            __tmp.len()
8050        }
8051    }
8052}
8053#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
8054#[doc = ""]
8055#[doc = "ID: 388"]
8056#[derive(Debug, Clone, PartialEq)]
8057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8059pub struct CAN_FILTER_MODIFY_DATA {
8060    #[doc = "filter IDs, length num_ids"]
8061    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8062    pub ids: [u16; 16],
8063    #[doc = "System ID."]
8064    pub target_system: u8,
8065    #[doc = "Component ID."]
8066    pub target_component: u8,
8067    #[doc = "bus number"]
8068    pub bus: u8,
8069    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
8070    pub operation: CanFilterOp,
8071    #[doc = "number of IDs in filter list"]
8072    pub num_ids: u8,
8073}
8074impl CAN_FILTER_MODIFY_DATA {
8075    pub const ENCODED_LEN: usize = 37usize;
8076    pub const DEFAULT: Self = Self {
8077        ids: [0_u16; 16usize],
8078        target_system: 0_u8,
8079        target_component: 0_u8,
8080        bus: 0_u8,
8081        operation: CanFilterOp::DEFAULT,
8082        num_ids: 0_u8,
8083    };
8084    #[cfg(feature = "arbitrary")]
8085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8086        use arbitrary::{Arbitrary, Unstructured};
8087        let mut buf = [0u8; 1024];
8088        rng.fill_bytes(&mut buf);
8089        let mut unstructured = Unstructured::new(&buf);
8090        Self::arbitrary(&mut unstructured).unwrap_or_default()
8091    }
8092}
8093impl Default for CAN_FILTER_MODIFY_DATA {
8094    fn default() -> Self {
8095        Self::DEFAULT.clone()
8096    }
8097}
8098impl MessageData for CAN_FILTER_MODIFY_DATA {
8099    type Message = MavMessage;
8100    const ID: u32 = 388u32;
8101    const NAME: &'static str = "CAN_FILTER_MODIFY";
8102    const EXTRA_CRC: u8 = 8u8;
8103    const ENCODED_LEN: usize = 37usize;
8104    fn deser(
8105        _version: MavlinkVersion,
8106        __input: &[u8],
8107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8108        let avail_len = __input.len();
8109        let mut payload_buf = [0; Self::ENCODED_LEN];
8110        let mut buf = if avail_len < Self::ENCODED_LEN {
8111            payload_buf[0..avail_len].copy_from_slice(__input);
8112            Bytes::new(&payload_buf)
8113        } else {
8114            Bytes::new(__input)
8115        };
8116        let mut __struct = Self::default();
8117        for v in &mut __struct.ids {
8118            let val = buf.get_u16_le();
8119            *v = val;
8120        }
8121        __struct.target_system = buf.get_u8();
8122        __struct.target_component = buf.get_u8();
8123        __struct.bus = buf.get_u8();
8124        let tmp = buf.get_u8();
8125        __struct.operation =
8126            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8127                enum_type: "CanFilterOp",
8128                value: tmp as u32,
8129            })?;
8130        __struct.num_ids = buf.get_u8();
8131        Ok(__struct)
8132    }
8133    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8134        let mut __tmp = BytesMut::new(bytes);
8135        #[allow(clippy::absurd_extreme_comparisons)]
8136        #[allow(unused_comparisons)]
8137        if __tmp.remaining() < Self::ENCODED_LEN {
8138            panic!(
8139                "buffer is too small (need {} bytes, but got {})",
8140                Self::ENCODED_LEN,
8141                __tmp.remaining(),
8142            )
8143        }
8144        for val in &self.ids {
8145            __tmp.put_u16_le(*val);
8146        }
8147        __tmp.put_u8(self.target_system);
8148        __tmp.put_u8(self.target_component);
8149        __tmp.put_u8(self.bus);
8150        __tmp.put_u8(self.operation as u8);
8151        __tmp.put_u8(self.num_ids);
8152        if matches!(version, MavlinkVersion::V2) {
8153            let len = __tmp.len();
8154            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8155        } else {
8156            __tmp.len()
8157        }
8158    }
8159}
8160#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
8161#[doc = ""]
8162#[doc = "ID: 386"]
8163#[derive(Debug, Clone, PartialEq)]
8164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8166pub struct CAN_FRAME_DATA {
8167    #[doc = "Frame ID"]
8168    pub id: u32,
8169    #[doc = "System ID."]
8170    pub target_system: u8,
8171    #[doc = "Component ID."]
8172    pub target_component: u8,
8173    #[doc = "Bus number"]
8174    pub bus: u8,
8175    #[doc = "Frame length"]
8176    pub len: u8,
8177    #[doc = "Frame data"]
8178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8179    pub data: [u8; 8],
8180}
8181impl CAN_FRAME_DATA {
8182    pub const ENCODED_LEN: usize = 16usize;
8183    pub const DEFAULT: Self = Self {
8184        id: 0_u32,
8185        target_system: 0_u8,
8186        target_component: 0_u8,
8187        bus: 0_u8,
8188        len: 0_u8,
8189        data: [0_u8; 8usize],
8190    };
8191    #[cfg(feature = "arbitrary")]
8192    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8193        use arbitrary::{Arbitrary, Unstructured};
8194        let mut buf = [0u8; 1024];
8195        rng.fill_bytes(&mut buf);
8196        let mut unstructured = Unstructured::new(&buf);
8197        Self::arbitrary(&mut unstructured).unwrap_or_default()
8198    }
8199}
8200impl Default for CAN_FRAME_DATA {
8201    fn default() -> Self {
8202        Self::DEFAULT.clone()
8203    }
8204}
8205impl MessageData for CAN_FRAME_DATA {
8206    type Message = MavMessage;
8207    const ID: u32 = 386u32;
8208    const NAME: &'static str = "CAN_FRAME";
8209    const EXTRA_CRC: u8 = 132u8;
8210    const ENCODED_LEN: usize = 16usize;
8211    fn deser(
8212        _version: MavlinkVersion,
8213        __input: &[u8],
8214    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8215        let avail_len = __input.len();
8216        let mut payload_buf = [0; Self::ENCODED_LEN];
8217        let mut buf = if avail_len < Self::ENCODED_LEN {
8218            payload_buf[0..avail_len].copy_from_slice(__input);
8219            Bytes::new(&payload_buf)
8220        } else {
8221            Bytes::new(__input)
8222        };
8223        let mut __struct = Self::default();
8224        __struct.id = buf.get_u32_le();
8225        __struct.target_system = buf.get_u8();
8226        __struct.target_component = buf.get_u8();
8227        __struct.bus = buf.get_u8();
8228        __struct.len = buf.get_u8();
8229        for v in &mut __struct.data {
8230            let val = buf.get_u8();
8231            *v = val;
8232        }
8233        Ok(__struct)
8234    }
8235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8236        let mut __tmp = BytesMut::new(bytes);
8237        #[allow(clippy::absurd_extreme_comparisons)]
8238        #[allow(unused_comparisons)]
8239        if __tmp.remaining() < Self::ENCODED_LEN {
8240            panic!(
8241                "buffer is too small (need {} bytes, but got {})",
8242                Self::ENCODED_LEN,
8243                __tmp.remaining(),
8244            )
8245        }
8246        __tmp.put_u32_le(self.id);
8247        __tmp.put_u8(self.target_system);
8248        __tmp.put_u8(self.target_component);
8249        __tmp.put_u8(self.bus);
8250        __tmp.put_u8(self.len);
8251        for val in &self.data {
8252            __tmp.put_u8(*val);
8253        }
8254        if matches!(version, MavlinkVersion::V2) {
8255            let len = __tmp.len();
8256            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8257        } else {
8258            __tmp.len()
8259        }
8260    }
8261}
8262#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8263#[doc = ""]
8264#[doc = "ID: 336"]
8265#[derive(Debug, Clone, PartialEq)]
8266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8268pub struct CELLULAR_CONFIG_DATA {
8269    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8270    pub enable_lte: u8,
8271    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8272    pub enable_pin: u8,
8273    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8274    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8275    pub pin: [u8; 16],
8276    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8277    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8278    pub new_pin: [u8; 16],
8279    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8280    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8281    pub apn: [u8; 32],
8282    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8283    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8284    pub puk: [u8; 16],
8285    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8286    pub roaming: u8,
8287    #[doc = "Message acceptance response (sent back to GS)."]
8288    pub response: CellularConfigResponse,
8289}
8290impl CELLULAR_CONFIG_DATA {
8291    pub const ENCODED_LEN: usize = 84usize;
8292    pub const DEFAULT: Self = Self {
8293        enable_lte: 0_u8,
8294        enable_pin: 0_u8,
8295        pin: [0_u8; 16usize],
8296        new_pin: [0_u8; 16usize],
8297        apn: [0_u8; 32usize],
8298        puk: [0_u8; 16usize],
8299        roaming: 0_u8,
8300        response: CellularConfigResponse::DEFAULT,
8301    };
8302    #[cfg(feature = "arbitrary")]
8303    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8304        use arbitrary::{Arbitrary, Unstructured};
8305        let mut buf = [0u8; 1024];
8306        rng.fill_bytes(&mut buf);
8307        let mut unstructured = Unstructured::new(&buf);
8308        Self::arbitrary(&mut unstructured).unwrap_or_default()
8309    }
8310}
8311impl Default for CELLULAR_CONFIG_DATA {
8312    fn default() -> Self {
8313        Self::DEFAULT.clone()
8314    }
8315}
8316impl MessageData for CELLULAR_CONFIG_DATA {
8317    type Message = MavMessage;
8318    const ID: u32 = 336u32;
8319    const NAME: &'static str = "CELLULAR_CONFIG";
8320    const EXTRA_CRC: u8 = 245u8;
8321    const ENCODED_LEN: usize = 84usize;
8322    fn deser(
8323        _version: MavlinkVersion,
8324        __input: &[u8],
8325    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8326        let avail_len = __input.len();
8327        let mut payload_buf = [0; Self::ENCODED_LEN];
8328        let mut buf = if avail_len < Self::ENCODED_LEN {
8329            payload_buf[0..avail_len].copy_from_slice(__input);
8330            Bytes::new(&payload_buf)
8331        } else {
8332            Bytes::new(__input)
8333        };
8334        let mut __struct = Self::default();
8335        __struct.enable_lte = buf.get_u8();
8336        __struct.enable_pin = buf.get_u8();
8337        for v in &mut __struct.pin {
8338            let val = buf.get_u8();
8339            *v = val;
8340        }
8341        for v in &mut __struct.new_pin {
8342            let val = buf.get_u8();
8343            *v = val;
8344        }
8345        for v in &mut __struct.apn {
8346            let val = buf.get_u8();
8347            *v = val;
8348        }
8349        for v in &mut __struct.puk {
8350            let val = buf.get_u8();
8351            *v = val;
8352        }
8353        __struct.roaming = buf.get_u8();
8354        let tmp = buf.get_u8();
8355        __struct.response =
8356            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8357                enum_type: "CellularConfigResponse",
8358                value: tmp as u32,
8359            })?;
8360        Ok(__struct)
8361    }
8362    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8363        let mut __tmp = BytesMut::new(bytes);
8364        #[allow(clippy::absurd_extreme_comparisons)]
8365        #[allow(unused_comparisons)]
8366        if __tmp.remaining() < Self::ENCODED_LEN {
8367            panic!(
8368                "buffer is too small (need {} bytes, but got {})",
8369                Self::ENCODED_LEN,
8370                __tmp.remaining(),
8371            )
8372        }
8373        __tmp.put_u8(self.enable_lte);
8374        __tmp.put_u8(self.enable_pin);
8375        for val in &self.pin {
8376            __tmp.put_u8(*val);
8377        }
8378        for val in &self.new_pin {
8379            __tmp.put_u8(*val);
8380        }
8381        for val in &self.apn {
8382            __tmp.put_u8(*val);
8383        }
8384        for val in &self.puk {
8385            __tmp.put_u8(*val);
8386        }
8387        __tmp.put_u8(self.roaming);
8388        __tmp.put_u8(self.response as u8);
8389        if matches!(version, MavlinkVersion::V2) {
8390            let len = __tmp.len();
8391            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8392        } else {
8393            __tmp.len()
8394        }
8395    }
8396}
8397#[doc = "Report current used cellular network status."]
8398#[doc = ""]
8399#[doc = "ID: 334"]
8400#[derive(Debug, Clone, PartialEq)]
8401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8403pub struct CELLULAR_STATUS_DATA {
8404    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8405    pub mcc: u16,
8406    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8407    pub mnc: u16,
8408    #[doc = "Location area code. If unknown, set to 0"]
8409    pub lac: u16,
8410    #[doc = "Cellular modem status"]
8411    pub status: CellularStatusFlag,
8412    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8413    pub failure_reason: CellularNetworkFailedReason,
8414    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8415    pub mavtype: CellularNetworkRadioType,
8416    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8417    pub quality: u8,
8418}
8419impl CELLULAR_STATUS_DATA {
8420    pub const ENCODED_LEN: usize = 10usize;
8421    pub const DEFAULT: Self = Self {
8422        mcc: 0_u16,
8423        mnc: 0_u16,
8424        lac: 0_u16,
8425        status: CellularStatusFlag::DEFAULT,
8426        failure_reason: CellularNetworkFailedReason::DEFAULT,
8427        mavtype: CellularNetworkRadioType::DEFAULT,
8428        quality: 0_u8,
8429    };
8430    #[cfg(feature = "arbitrary")]
8431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8432        use arbitrary::{Arbitrary, Unstructured};
8433        let mut buf = [0u8; 1024];
8434        rng.fill_bytes(&mut buf);
8435        let mut unstructured = Unstructured::new(&buf);
8436        Self::arbitrary(&mut unstructured).unwrap_or_default()
8437    }
8438}
8439impl Default for CELLULAR_STATUS_DATA {
8440    fn default() -> Self {
8441        Self::DEFAULT.clone()
8442    }
8443}
8444impl MessageData for CELLULAR_STATUS_DATA {
8445    type Message = MavMessage;
8446    const ID: u32 = 334u32;
8447    const NAME: &'static str = "CELLULAR_STATUS";
8448    const EXTRA_CRC: u8 = 72u8;
8449    const ENCODED_LEN: usize = 10usize;
8450    fn deser(
8451        _version: MavlinkVersion,
8452        __input: &[u8],
8453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8454        let avail_len = __input.len();
8455        let mut payload_buf = [0; Self::ENCODED_LEN];
8456        let mut buf = if avail_len < Self::ENCODED_LEN {
8457            payload_buf[0..avail_len].copy_from_slice(__input);
8458            Bytes::new(&payload_buf)
8459        } else {
8460            Bytes::new(__input)
8461        };
8462        let mut __struct = Self::default();
8463        __struct.mcc = buf.get_u16_le();
8464        __struct.mnc = buf.get_u16_le();
8465        __struct.lac = buf.get_u16_le();
8466        let tmp = buf.get_u8();
8467        __struct.status =
8468            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8469                enum_type: "CellularStatusFlag",
8470                value: tmp as u32,
8471            })?;
8472        let tmp = buf.get_u8();
8473        __struct.failure_reason =
8474            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8475                enum_type: "CellularNetworkFailedReason",
8476                value: tmp as u32,
8477            })?;
8478        let tmp = buf.get_u8();
8479        __struct.mavtype =
8480            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8481                enum_type: "CellularNetworkRadioType",
8482                value: tmp as u32,
8483            })?;
8484        __struct.quality = buf.get_u8();
8485        Ok(__struct)
8486    }
8487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8488        let mut __tmp = BytesMut::new(bytes);
8489        #[allow(clippy::absurd_extreme_comparisons)]
8490        #[allow(unused_comparisons)]
8491        if __tmp.remaining() < Self::ENCODED_LEN {
8492            panic!(
8493                "buffer is too small (need {} bytes, but got {})",
8494                Self::ENCODED_LEN,
8495                __tmp.remaining(),
8496            )
8497        }
8498        __tmp.put_u16_le(self.mcc);
8499        __tmp.put_u16_le(self.mnc);
8500        __tmp.put_u16_le(self.lac);
8501        __tmp.put_u8(self.status as u8);
8502        __tmp.put_u8(self.failure_reason as u8);
8503        __tmp.put_u8(self.mavtype as u8);
8504        __tmp.put_u8(self.quality);
8505        if matches!(version, MavlinkVersion::V2) {
8506            let len = __tmp.len();
8507            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8508        } else {
8509            __tmp.len()
8510        }
8511    }
8512}
8513#[doc = "Request to control this MAV."]
8514#[doc = ""]
8515#[doc = "ID: 5"]
8516#[derive(Debug, Clone, PartialEq)]
8517#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8518#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8519pub struct CHANGE_OPERATOR_CONTROL_DATA {
8520    #[doc = "System the GCS requests control for"]
8521    pub target_system: u8,
8522    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8523    pub control_request: u8,
8524    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8525    pub version: u8,
8526    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8527    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8528    pub passkey: [u8; 25],
8529}
8530impl CHANGE_OPERATOR_CONTROL_DATA {
8531    pub const ENCODED_LEN: usize = 28usize;
8532    pub const DEFAULT: Self = Self {
8533        target_system: 0_u8,
8534        control_request: 0_u8,
8535        version: 0_u8,
8536        passkey: [0_u8; 25usize],
8537    };
8538    #[cfg(feature = "arbitrary")]
8539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8540        use arbitrary::{Arbitrary, Unstructured};
8541        let mut buf = [0u8; 1024];
8542        rng.fill_bytes(&mut buf);
8543        let mut unstructured = Unstructured::new(&buf);
8544        Self::arbitrary(&mut unstructured).unwrap_or_default()
8545    }
8546}
8547impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8548    fn default() -> Self {
8549        Self::DEFAULT.clone()
8550    }
8551}
8552impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8553    type Message = MavMessage;
8554    const ID: u32 = 5u32;
8555    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8556    const EXTRA_CRC: u8 = 217u8;
8557    const ENCODED_LEN: usize = 28usize;
8558    fn deser(
8559        _version: MavlinkVersion,
8560        __input: &[u8],
8561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8562        let avail_len = __input.len();
8563        let mut payload_buf = [0; Self::ENCODED_LEN];
8564        let mut buf = if avail_len < Self::ENCODED_LEN {
8565            payload_buf[0..avail_len].copy_from_slice(__input);
8566            Bytes::new(&payload_buf)
8567        } else {
8568            Bytes::new(__input)
8569        };
8570        let mut __struct = Self::default();
8571        __struct.target_system = buf.get_u8();
8572        __struct.control_request = buf.get_u8();
8573        __struct.version = buf.get_u8();
8574        for v in &mut __struct.passkey {
8575            let val = buf.get_u8();
8576            *v = val;
8577        }
8578        Ok(__struct)
8579    }
8580    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8581        let mut __tmp = BytesMut::new(bytes);
8582        #[allow(clippy::absurd_extreme_comparisons)]
8583        #[allow(unused_comparisons)]
8584        if __tmp.remaining() < Self::ENCODED_LEN {
8585            panic!(
8586                "buffer is too small (need {} bytes, but got {})",
8587                Self::ENCODED_LEN,
8588                __tmp.remaining(),
8589            )
8590        }
8591        __tmp.put_u8(self.target_system);
8592        __tmp.put_u8(self.control_request);
8593        __tmp.put_u8(self.version);
8594        for val in &self.passkey {
8595            __tmp.put_u8(*val);
8596        }
8597        if matches!(version, MavlinkVersion::V2) {
8598            let len = __tmp.len();
8599            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8600        } else {
8601            __tmp.len()
8602        }
8603    }
8604}
8605#[doc = "Accept / deny control of this MAV."]
8606#[doc = ""]
8607#[doc = "ID: 6"]
8608#[derive(Debug, Clone, PartialEq)]
8609#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8610#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8611pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8612    #[doc = "ID of the GCS this message"]
8613    pub gcs_system_id: u8,
8614    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8615    pub control_request: u8,
8616    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8617    pub ack: u8,
8618}
8619impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8620    pub const ENCODED_LEN: usize = 3usize;
8621    pub const DEFAULT: Self = Self {
8622        gcs_system_id: 0_u8,
8623        control_request: 0_u8,
8624        ack: 0_u8,
8625    };
8626    #[cfg(feature = "arbitrary")]
8627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8628        use arbitrary::{Arbitrary, Unstructured};
8629        let mut buf = [0u8; 1024];
8630        rng.fill_bytes(&mut buf);
8631        let mut unstructured = Unstructured::new(&buf);
8632        Self::arbitrary(&mut unstructured).unwrap_or_default()
8633    }
8634}
8635impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8636    fn default() -> Self {
8637        Self::DEFAULT.clone()
8638    }
8639}
8640impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8641    type Message = MavMessage;
8642    const ID: u32 = 6u32;
8643    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8644    const EXTRA_CRC: u8 = 104u8;
8645    const ENCODED_LEN: usize = 3usize;
8646    fn deser(
8647        _version: MavlinkVersion,
8648        __input: &[u8],
8649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8650        let avail_len = __input.len();
8651        let mut payload_buf = [0; Self::ENCODED_LEN];
8652        let mut buf = if avail_len < Self::ENCODED_LEN {
8653            payload_buf[0..avail_len].copy_from_slice(__input);
8654            Bytes::new(&payload_buf)
8655        } else {
8656            Bytes::new(__input)
8657        };
8658        let mut __struct = Self::default();
8659        __struct.gcs_system_id = buf.get_u8();
8660        __struct.control_request = buf.get_u8();
8661        __struct.ack = buf.get_u8();
8662        Ok(__struct)
8663    }
8664    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8665        let mut __tmp = BytesMut::new(bytes);
8666        #[allow(clippy::absurd_extreme_comparisons)]
8667        #[allow(unused_comparisons)]
8668        if __tmp.remaining() < Self::ENCODED_LEN {
8669            panic!(
8670                "buffer is too small (need {} bytes, but got {})",
8671                Self::ENCODED_LEN,
8672                __tmp.remaining(),
8673            )
8674        }
8675        __tmp.put_u8(self.gcs_system_id);
8676        __tmp.put_u8(self.control_request);
8677        __tmp.put_u8(self.ack);
8678        if matches!(version, MavlinkVersion::V2) {
8679            let len = __tmp.len();
8680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8681        } else {
8682            __tmp.len()
8683        }
8684    }
8685}
8686#[doc = "Information about a potential collision."]
8687#[doc = ""]
8688#[doc = "ID: 247"]
8689#[derive(Debug, Clone, PartialEq)]
8690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8692pub struct COLLISION_DATA {
8693    #[doc = "Unique identifier, domain based on src field"]
8694    pub id: u32,
8695    #[doc = "Estimated time until collision occurs"]
8696    pub time_to_minimum_delta: f32,
8697    #[doc = "Closest vertical distance between vehicle and object"]
8698    pub altitude_minimum_delta: f32,
8699    #[doc = "Closest horizontal distance between vehicle and object"]
8700    pub horizontal_minimum_delta: f32,
8701    #[doc = "Collision data source"]
8702    pub src: MavCollisionSrc,
8703    #[doc = "Action that is being taken to avoid this collision"]
8704    pub action: MavCollisionAction,
8705    #[doc = "How concerned the aircraft is about this collision"]
8706    pub threat_level: MavCollisionThreatLevel,
8707}
8708impl COLLISION_DATA {
8709    pub const ENCODED_LEN: usize = 19usize;
8710    pub const DEFAULT: Self = Self {
8711        id: 0_u32,
8712        time_to_minimum_delta: 0.0_f32,
8713        altitude_minimum_delta: 0.0_f32,
8714        horizontal_minimum_delta: 0.0_f32,
8715        src: MavCollisionSrc::DEFAULT,
8716        action: MavCollisionAction::DEFAULT,
8717        threat_level: MavCollisionThreatLevel::DEFAULT,
8718    };
8719    #[cfg(feature = "arbitrary")]
8720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8721        use arbitrary::{Arbitrary, Unstructured};
8722        let mut buf = [0u8; 1024];
8723        rng.fill_bytes(&mut buf);
8724        let mut unstructured = Unstructured::new(&buf);
8725        Self::arbitrary(&mut unstructured).unwrap_or_default()
8726    }
8727}
8728impl Default for COLLISION_DATA {
8729    fn default() -> Self {
8730        Self::DEFAULT.clone()
8731    }
8732}
8733impl MessageData for COLLISION_DATA {
8734    type Message = MavMessage;
8735    const ID: u32 = 247u32;
8736    const NAME: &'static str = "COLLISION";
8737    const EXTRA_CRC: u8 = 81u8;
8738    const ENCODED_LEN: usize = 19usize;
8739    fn deser(
8740        _version: MavlinkVersion,
8741        __input: &[u8],
8742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8743        let avail_len = __input.len();
8744        let mut payload_buf = [0; Self::ENCODED_LEN];
8745        let mut buf = if avail_len < Self::ENCODED_LEN {
8746            payload_buf[0..avail_len].copy_from_slice(__input);
8747            Bytes::new(&payload_buf)
8748        } else {
8749            Bytes::new(__input)
8750        };
8751        let mut __struct = Self::default();
8752        __struct.id = buf.get_u32_le();
8753        __struct.time_to_minimum_delta = buf.get_f32_le();
8754        __struct.altitude_minimum_delta = buf.get_f32_le();
8755        __struct.horizontal_minimum_delta = buf.get_f32_le();
8756        let tmp = buf.get_u8();
8757        __struct.src =
8758            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8759                enum_type: "MavCollisionSrc",
8760                value: tmp as u32,
8761            })?;
8762        let tmp = buf.get_u8();
8763        __struct.action =
8764            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8765                enum_type: "MavCollisionAction",
8766                value: tmp as u32,
8767            })?;
8768        let tmp = buf.get_u8();
8769        __struct.threat_level =
8770            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8771                enum_type: "MavCollisionThreatLevel",
8772                value: tmp as u32,
8773            })?;
8774        Ok(__struct)
8775    }
8776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8777        let mut __tmp = BytesMut::new(bytes);
8778        #[allow(clippy::absurd_extreme_comparisons)]
8779        #[allow(unused_comparisons)]
8780        if __tmp.remaining() < Self::ENCODED_LEN {
8781            panic!(
8782                "buffer is too small (need {} bytes, but got {})",
8783                Self::ENCODED_LEN,
8784                __tmp.remaining(),
8785            )
8786        }
8787        __tmp.put_u32_le(self.id);
8788        __tmp.put_f32_le(self.time_to_minimum_delta);
8789        __tmp.put_f32_le(self.altitude_minimum_delta);
8790        __tmp.put_f32_le(self.horizontal_minimum_delta);
8791        __tmp.put_u8(self.src as u8);
8792        __tmp.put_u8(self.action as u8);
8793        __tmp.put_u8(self.threat_level as u8);
8794        if matches!(version, MavlinkVersion::V2) {
8795            let len = __tmp.len();
8796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8797        } else {
8798            __tmp.len()
8799        }
8800    }
8801}
8802#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8803#[doc = ""]
8804#[doc = "ID: 77"]
8805#[derive(Debug, Clone, PartialEq)]
8806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8808pub struct COMMAND_ACK_DATA {
8809    #[doc = "Command ID (of acknowledged command)."]
8810    pub command: MavCmd,
8811    #[doc = "Result of command."]
8812    pub result: MavResult,
8813    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8815    pub progress: u8,
8816    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8818    pub result_param2: i32,
8819    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8821    pub target_system: u8,
8822    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8824    pub target_component: u8,
8825}
8826impl COMMAND_ACK_DATA {
8827    pub const ENCODED_LEN: usize = 10usize;
8828    pub const DEFAULT: Self = Self {
8829        command: MavCmd::DEFAULT,
8830        result: MavResult::DEFAULT,
8831        progress: 0_u8,
8832        result_param2: 0_i32,
8833        target_system: 0_u8,
8834        target_component: 0_u8,
8835    };
8836    #[cfg(feature = "arbitrary")]
8837    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8838        use arbitrary::{Arbitrary, Unstructured};
8839        let mut buf = [0u8; 1024];
8840        rng.fill_bytes(&mut buf);
8841        let mut unstructured = Unstructured::new(&buf);
8842        Self::arbitrary(&mut unstructured).unwrap_or_default()
8843    }
8844}
8845impl Default for COMMAND_ACK_DATA {
8846    fn default() -> Self {
8847        Self::DEFAULT.clone()
8848    }
8849}
8850impl MessageData for COMMAND_ACK_DATA {
8851    type Message = MavMessage;
8852    const ID: u32 = 77u32;
8853    const NAME: &'static str = "COMMAND_ACK";
8854    const EXTRA_CRC: u8 = 143u8;
8855    const ENCODED_LEN: usize = 10usize;
8856    fn deser(
8857        _version: MavlinkVersion,
8858        __input: &[u8],
8859    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8860        let avail_len = __input.len();
8861        let mut payload_buf = [0; Self::ENCODED_LEN];
8862        let mut buf = if avail_len < Self::ENCODED_LEN {
8863            payload_buf[0..avail_len].copy_from_slice(__input);
8864            Bytes::new(&payload_buf)
8865        } else {
8866            Bytes::new(__input)
8867        };
8868        let mut __struct = Self::default();
8869        let tmp = buf.get_u16_le();
8870        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8871            ::mavlink_core::error::ParserError::InvalidEnum {
8872                enum_type: "MavCmd",
8873                value: tmp as u32,
8874            },
8875        )?;
8876        let tmp = buf.get_u8();
8877        __struct.result =
8878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8879                enum_type: "MavResult",
8880                value: tmp as u32,
8881            })?;
8882        __struct.progress = buf.get_u8();
8883        __struct.result_param2 = buf.get_i32_le();
8884        __struct.target_system = buf.get_u8();
8885        __struct.target_component = buf.get_u8();
8886        Ok(__struct)
8887    }
8888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8889        let mut __tmp = BytesMut::new(bytes);
8890        #[allow(clippy::absurd_extreme_comparisons)]
8891        #[allow(unused_comparisons)]
8892        if __tmp.remaining() < Self::ENCODED_LEN {
8893            panic!(
8894                "buffer is too small (need {} bytes, but got {})",
8895                Self::ENCODED_LEN,
8896                __tmp.remaining(),
8897            )
8898        }
8899        __tmp.put_u16_le(self.command as u16);
8900        __tmp.put_u8(self.result as u8);
8901        __tmp.put_u8(self.progress);
8902        __tmp.put_i32_le(self.result_param2);
8903        __tmp.put_u8(self.target_system);
8904        __tmp.put_u8(self.target_component);
8905        if matches!(version, MavlinkVersion::V2) {
8906            let len = __tmp.len();
8907            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8908        } else {
8909            __tmp.len()
8910        }
8911    }
8912}
8913#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8914#[doc = ""]
8915#[doc = "ID: 80"]
8916#[derive(Debug, Clone, PartialEq)]
8917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8919pub struct COMMAND_CANCEL_DATA {
8920    #[doc = "Command ID (of command to cancel)."]
8921    pub command: MavCmd,
8922    #[doc = "System executing long running command. Should not be broadcast (0)."]
8923    pub target_system: u8,
8924    #[doc = "Component executing long running command."]
8925    pub target_component: u8,
8926}
8927impl COMMAND_CANCEL_DATA {
8928    pub const ENCODED_LEN: usize = 4usize;
8929    pub const DEFAULT: Self = Self {
8930        command: MavCmd::DEFAULT,
8931        target_system: 0_u8,
8932        target_component: 0_u8,
8933    };
8934    #[cfg(feature = "arbitrary")]
8935    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8936        use arbitrary::{Arbitrary, Unstructured};
8937        let mut buf = [0u8; 1024];
8938        rng.fill_bytes(&mut buf);
8939        let mut unstructured = Unstructured::new(&buf);
8940        Self::arbitrary(&mut unstructured).unwrap_or_default()
8941    }
8942}
8943impl Default for COMMAND_CANCEL_DATA {
8944    fn default() -> Self {
8945        Self::DEFAULT.clone()
8946    }
8947}
8948impl MessageData for COMMAND_CANCEL_DATA {
8949    type Message = MavMessage;
8950    const ID: u32 = 80u32;
8951    const NAME: &'static str = "COMMAND_CANCEL";
8952    const EXTRA_CRC: u8 = 14u8;
8953    const ENCODED_LEN: usize = 4usize;
8954    fn deser(
8955        _version: MavlinkVersion,
8956        __input: &[u8],
8957    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8958        let avail_len = __input.len();
8959        let mut payload_buf = [0; Self::ENCODED_LEN];
8960        let mut buf = if avail_len < Self::ENCODED_LEN {
8961            payload_buf[0..avail_len].copy_from_slice(__input);
8962            Bytes::new(&payload_buf)
8963        } else {
8964            Bytes::new(__input)
8965        };
8966        let mut __struct = Self::default();
8967        let tmp = buf.get_u16_le();
8968        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8969            ::mavlink_core::error::ParserError::InvalidEnum {
8970                enum_type: "MavCmd",
8971                value: tmp as u32,
8972            },
8973        )?;
8974        __struct.target_system = buf.get_u8();
8975        __struct.target_component = buf.get_u8();
8976        Ok(__struct)
8977    }
8978    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8979        let mut __tmp = BytesMut::new(bytes);
8980        #[allow(clippy::absurd_extreme_comparisons)]
8981        #[allow(unused_comparisons)]
8982        if __tmp.remaining() < Self::ENCODED_LEN {
8983            panic!(
8984                "buffer is too small (need {} bytes, but got {})",
8985                Self::ENCODED_LEN,
8986                __tmp.remaining(),
8987            )
8988        }
8989        __tmp.put_u16_le(self.command as u16);
8990        __tmp.put_u8(self.target_system);
8991        __tmp.put_u8(self.target_component);
8992        if matches!(version, MavlinkVersion::V2) {
8993            let len = __tmp.len();
8994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8995        } else {
8996            __tmp.len()
8997        }
8998    }
8999}
9000#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9001#[doc = ""]
9002#[doc = "ID: 75"]
9003#[derive(Debug, Clone, PartialEq)]
9004#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9005#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9006pub struct COMMAND_INT_DATA {
9007    #[doc = "PARAM1, see MAV_CMD enum"]
9008    pub param1: f32,
9009    #[doc = "PARAM2, see MAV_CMD enum"]
9010    pub param2: f32,
9011    #[doc = "PARAM3, see MAV_CMD enum"]
9012    pub param3: f32,
9013    #[doc = "PARAM4, see MAV_CMD enum"]
9014    pub param4: f32,
9015    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
9016    pub x: i32,
9017    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
9018    pub y: i32,
9019    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
9020    pub z: f32,
9021    #[doc = "The scheduled action for the mission item."]
9022    pub command: MavCmd,
9023    #[doc = "System ID"]
9024    pub target_system: u8,
9025    #[doc = "Component ID"]
9026    pub target_component: u8,
9027    #[doc = "The coordinate system of the COMMAND."]
9028    pub frame: MavFrame,
9029    #[doc = "Not used."]
9030    pub current: u8,
9031    #[doc = "Not used (set 0)."]
9032    pub autocontinue: u8,
9033}
9034impl COMMAND_INT_DATA {
9035    pub const ENCODED_LEN: usize = 35usize;
9036    pub const DEFAULT: Self = Self {
9037        param1: 0.0_f32,
9038        param2: 0.0_f32,
9039        param3: 0.0_f32,
9040        param4: 0.0_f32,
9041        x: 0_i32,
9042        y: 0_i32,
9043        z: 0.0_f32,
9044        command: MavCmd::DEFAULT,
9045        target_system: 0_u8,
9046        target_component: 0_u8,
9047        frame: MavFrame::DEFAULT,
9048        current: 0_u8,
9049        autocontinue: 0_u8,
9050    };
9051    #[cfg(feature = "arbitrary")]
9052    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9053        use arbitrary::{Arbitrary, Unstructured};
9054        let mut buf = [0u8; 1024];
9055        rng.fill_bytes(&mut buf);
9056        let mut unstructured = Unstructured::new(&buf);
9057        Self::arbitrary(&mut unstructured).unwrap_or_default()
9058    }
9059}
9060impl Default for COMMAND_INT_DATA {
9061    fn default() -> Self {
9062        Self::DEFAULT.clone()
9063    }
9064}
9065impl MessageData for COMMAND_INT_DATA {
9066    type Message = MavMessage;
9067    const ID: u32 = 75u32;
9068    const NAME: &'static str = "COMMAND_INT";
9069    const EXTRA_CRC: u8 = 158u8;
9070    const ENCODED_LEN: usize = 35usize;
9071    fn deser(
9072        _version: MavlinkVersion,
9073        __input: &[u8],
9074    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9075        let avail_len = __input.len();
9076        let mut payload_buf = [0; Self::ENCODED_LEN];
9077        let mut buf = if avail_len < Self::ENCODED_LEN {
9078            payload_buf[0..avail_len].copy_from_slice(__input);
9079            Bytes::new(&payload_buf)
9080        } else {
9081            Bytes::new(__input)
9082        };
9083        let mut __struct = Self::default();
9084        __struct.param1 = buf.get_f32_le();
9085        __struct.param2 = buf.get_f32_le();
9086        __struct.param3 = buf.get_f32_le();
9087        __struct.param4 = buf.get_f32_le();
9088        __struct.x = buf.get_i32_le();
9089        __struct.y = buf.get_i32_le();
9090        __struct.z = buf.get_f32_le();
9091        let tmp = buf.get_u16_le();
9092        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9093            ::mavlink_core::error::ParserError::InvalidEnum {
9094                enum_type: "MavCmd",
9095                value: tmp as u32,
9096            },
9097        )?;
9098        __struct.target_system = buf.get_u8();
9099        __struct.target_component = buf.get_u8();
9100        let tmp = buf.get_u8();
9101        __struct.frame =
9102            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9103                enum_type: "MavFrame",
9104                value: tmp as u32,
9105            })?;
9106        __struct.current = buf.get_u8();
9107        __struct.autocontinue = buf.get_u8();
9108        Ok(__struct)
9109    }
9110    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9111        let mut __tmp = BytesMut::new(bytes);
9112        #[allow(clippy::absurd_extreme_comparisons)]
9113        #[allow(unused_comparisons)]
9114        if __tmp.remaining() < Self::ENCODED_LEN {
9115            panic!(
9116                "buffer is too small (need {} bytes, but got {})",
9117                Self::ENCODED_LEN,
9118                __tmp.remaining(),
9119            )
9120        }
9121        __tmp.put_f32_le(self.param1);
9122        __tmp.put_f32_le(self.param2);
9123        __tmp.put_f32_le(self.param3);
9124        __tmp.put_f32_le(self.param4);
9125        __tmp.put_i32_le(self.x);
9126        __tmp.put_i32_le(self.y);
9127        __tmp.put_f32_le(self.z);
9128        __tmp.put_u16_le(self.command as u16);
9129        __tmp.put_u8(self.target_system);
9130        __tmp.put_u8(self.target_component);
9131        __tmp.put_u8(self.frame as u8);
9132        __tmp.put_u8(self.current);
9133        __tmp.put_u8(self.autocontinue);
9134        if matches!(version, MavlinkVersion::V2) {
9135            let len = __tmp.len();
9136            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9137        } else {
9138            __tmp.len()
9139        }
9140    }
9141}
9142#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
9143#[doc = ""]
9144#[doc = "ID: 76"]
9145#[derive(Debug, Clone, PartialEq)]
9146#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9147#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9148pub struct COMMAND_LONG_DATA {
9149    #[doc = "Parameter 1 (for the specific command)."]
9150    pub param1: f32,
9151    #[doc = "Parameter 2 (for the specific command)."]
9152    pub param2: f32,
9153    #[doc = "Parameter 3 (for the specific command)."]
9154    pub param3: f32,
9155    #[doc = "Parameter 4 (for the specific command)."]
9156    pub param4: f32,
9157    #[doc = "Parameter 5 (for the specific command)."]
9158    pub param5: f32,
9159    #[doc = "Parameter 6 (for the specific command)."]
9160    pub param6: f32,
9161    #[doc = "Parameter 7 (for the specific command)."]
9162    pub param7: f32,
9163    #[doc = "Command ID (of command to send)."]
9164    pub command: MavCmd,
9165    #[doc = "System which should execute the command"]
9166    pub target_system: u8,
9167    #[doc = "Component which should execute the command, 0 for all components"]
9168    pub target_component: u8,
9169    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
9170    pub confirmation: u8,
9171}
9172impl COMMAND_LONG_DATA {
9173    pub const ENCODED_LEN: usize = 33usize;
9174    pub const DEFAULT: Self = Self {
9175        param1: 0.0_f32,
9176        param2: 0.0_f32,
9177        param3: 0.0_f32,
9178        param4: 0.0_f32,
9179        param5: 0.0_f32,
9180        param6: 0.0_f32,
9181        param7: 0.0_f32,
9182        command: MavCmd::DEFAULT,
9183        target_system: 0_u8,
9184        target_component: 0_u8,
9185        confirmation: 0_u8,
9186    };
9187    #[cfg(feature = "arbitrary")]
9188    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9189        use arbitrary::{Arbitrary, Unstructured};
9190        let mut buf = [0u8; 1024];
9191        rng.fill_bytes(&mut buf);
9192        let mut unstructured = Unstructured::new(&buf);
9193        Self::arbitrary(&mut unstructured).unwrap_or_default()
9194    }
9195}
9196impl Default for COMMAND_LONG_DATA {
9197    fn default() -> Self {
9198        Self::DEFAULT.clone()
9199    }
9200}
9201impl MessageData for COMMAND_LONG_DATA {
9202    type Message = MavMessage;
9203    const ID: u32 = 76u32;
9204    const NAME: &'static str = "COMMAND_LONG";
9205    const EXTRA_CRC: u8 = 152u8;
9206    const ENCODED_LEN: usize = 33usize;
9207    fn deser(
9208        _version: MavlinkVersion,
9209        __input: &[u8],
9210    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9211        let avail_len = __input.len();
9212        let mut payload_buf = [0; Self::ENCODED_LEN];
9213        let mut buf = if avail_len < Self::ENCODED_LEN {
9214            payload_buf[0..avail_len].copy_from_slice(__input);
9215            Bytes::new(&payload_buf)
9216        } else {
9217            Bytes::new(__input)
9218        };
9219        let mut __struct = Self::default();
9220        __struct.param1 = buf.get_f32_le();
9221        __struct.param2 = buf.get_f32_le();
9222        __struct.param3 = buf.get_f32_le();
9223        __struct.param4 = buf.get_f32_le();
9224        __struct.param5 = buf.get_f32_le();
9225        __struct.param6 = buf.get_f32_le();
9226        __struct.param7 = buf.get_f32_le();
9227        let tmp = buf.get_u16_le();
9228        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9229            ::mavlink_core::error::ParserError::InvalidEnum {
9230                enum_type: "MavCmd",
9231                value: tmp as u32,
9232            },
9233        )?;
9234        __struct.target_system = buf.get_u8();
9235        __struct.target_component = buf.get_u8();
9236        __struct.confirmation = buf.get_u8();
9237        Ok(__struct)
9238    }
9239    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9240        let mut __tmp = BytesMut::new(bytes);
9241        #[allow(clippy::absurd_extreme_comparisons)]
9242        #[allow(unused_comparisons)]
9243        if __tmp.remaining() < Self::ENCODED_LEN {
9244            panic!(
9245                "buffer is too small (need {} bytes, but got {})",
9246                Self::ENCODED_LEN,
9247                __tmp.remaining(),
9248            )
9249        }
9250        __tmp.put_f32_le(self.param1);
9251        __tmp.put_f32_le(self.param2);
9252        __tmp.put_f32_le(self.param3);
9253        __tmp.put_f32_le(self.param4);
9254        __tmp.put_f32_le(self.param5);
9255        __tmp.put_f32_le(self.param6);
9256        __tmp.put_f32_le(self.param7);
9257        __tmp.put_u16_le(self.command as u16);
9258        __tmp.put_u8(self.target_system);
9259        __tmp.put_u8(self.target_component);
9260        __tmp.put_u8(self.confirmation);
9261        if matches!(version, MavlinkVersion::V2) {
9262            let len = __tmp.len();
9263            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9264        } else {
9265            __tmp.len()
9266        }
9267    }
9268}
9269#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9270#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9271#[doc = ""]
9272#[doc = "ID: 395"]
9273#[derive(Debug, Clone, PartialEq)]
9274#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9275#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9276pub struct COMPONENT_INFORMATION_DATA {
9277    #[doc = "Timestamp (time since system boot)."]
9278    pub time_boot_ms: u32,
9279    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9280    pub general_metadata_file_crc: u32,
9281    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9282    pub peripherals_metadata_file_crc: u32,
9283    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9284    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9285    pub general_metadata_uri: [u8; 100],
9286    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9287    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9288    pub peripherals_metadata_uri: [u8; 100],
9289}
9290impl COMPONENT_INFORMATION_DATA {
9291    pub const ENCODED_LEN: usize = 212usize;
9292    pub const DEFAULT: Self = Self {
9293        time_boot_ms: 0_u32,
9294        general_metadata_file_crc: 0_u32,
9295        peripherals_metadata_file_crc: 0_u32,
9296        general_metadata_uri: [0_u8; 100usize],
9297        peripherals_metadata_uri: [0_u8; 100usize],
9298    };
9299    #[cfg(feature = "arbitrary")]
9300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9301        use arbitrary::{Arbitrary, Unstructured};
9302        let mut buf = [0u8; 1024];
9303        rng.fill_bytes(&mut buf);
9304        let mut unstructured = Unstructured::new(&buf);
9305        Self::arbitrary(&mut unstructured).unwrap_or_default()
9306    }
9307}
9308impl Default for COMPONENT_INFORMATION_DATA {
9309    fn default() -> Self {
9310        Self::DEFAULT.clone()
9311    }
9312}
9313impl MessageData for COMPONENT_INFORMATION_DATA {
9314    type Message = MavMessage;
9315    const ID: u32 = 395u32;
9316    const NAME: &'static str = "COMPONENT_INFORMATION";
9317    const EXTRA_CRC: u8 = 0u8;
9318    const ENCODED_LEN: usize = 212usize;
9319    fn deser(
9320        _version: MavlinkVersion,
9321        __input: &[u8],
9322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9323        let avail_len = __input.len();
9324        let mut payload_buf = [0; Self::ENCODED_LEN];
9325        let mut buf = if avail_len < Self::ENCODED_LEN {
9326            payload_buf[0..avail_len].copy_from_slice(__input);
9327            Bytes::new(&payload_buf)
9328        } else {
9329            Bytes::new(__input)
9330        };
9331        let mut __struct = Self::default();
9332        __struct.time_boot_ms = buf.get_u32_le();
9333        __struct.general_metadata_file_crc = buf.get_u32_le();
9334        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9335        for v in &mut __struct.general_metadata_uri {
9336            let val = buf.get_u8();
9337            *v = val;
9338        }
9339        for v in &mut __struct.peripherals_metadata_uri {
9340            let val = buf.get_u8();
9341            *v = val;
9342        }
9343        Ok(__struct)
9344    }
9345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9346        let mut __tmp = BytesMut::new(bytes);
9347        #[allow(clippy::absurd_extreme_comparisons)]
9348        #[allow(unused_comparisons)]
9349        if __tmp.remaining() < Self::ENCODED_LEN {
9350            panic!(
9351                "buffer is too small (need {} bytes, but got {})",
9352                Self::ENCODED_LEN,
9353                __tmp.remaining(),
9354            )
9355        }
9356        __tmp.put_u32_le(self.time_boot_ms);
9357        __tmp.put_u32_le(self.general_metadata_file_crc);
9358        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9359        for val in &self.general_metadata_uri {
9360            __tmp.put_u8(*val);
9361        }
9362        for val in &self.peripherals_metadata_uri {
9363            __tmp.put_u8(*val);
9364        }
9365        if matches!(version, MavlinkVersion::V2) {
9366            let len = __tmp.len();
9367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9368        } else {
9369            __tmp.len()
9370        }
9371    }
9372}
9373#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9374#[doc = ""]
9375#[doc = "ID: 396"]
9376#[derive(Debug, Clone, PartialEq)]
9377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9379pub struct COMPONENT_INFORMATION_BASIC_DATA {
9380    #[doc = "Component capability flags"]
9381    pub capabilities: MavProtocolCapability,
9382    #[doc = "Timestamp (time since system boot)."]
9383    pub time_boot_ms: u32,
9384    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9385    pub time_manufacture_s: u32,
9386    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9387    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9388    pub vendor_name: [u8; 32],
9389    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9390    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9391    pub model_name: [u8; 32],
9392    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9393    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9394    pub software_version: [u8; 24],
9395    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9397    pub hardware_version: [u8; 24],
9398    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9399    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9400    pub serial_number: [u8; 32],
9401}
9402impl COMPONENT_INFORMATION_BASIC_DATA {
9403    pub const ENCODED_LEN: usize = 160usize;
9404    pub const DEFAULT: Self = Self {
9405        capabilities: MavProtocolCapability::DEFAULT,
9406        time_boot_ms: 0_u32,
9407        time_manufacture_s: 0_u32,
9408        vendor_name: [0_u8; 32usize],
9409        model_name: [0_u8; 32usize],
9410        software_version: [0_u8; 24usize],
9411        hardware_version: [0_u8; 24usize],
9412        serial_number: [0_u8; 32usize],
9413    };
9414    #[cfg(feature = "arbitrary")]
9415    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9416        use arbitrary::{Arbitrary, Unstructured};
9417        let mut buf = [0u8; 1024];
9418        rng.fill_bytes(&mut buf);
9419        let mut unstructured = Unstructured::new(&buf);
9420        Self::arbitrary(&mut unstructured).unwrap_or_default()
9421    }
9422}
9423impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9424    fn default() -> Self {
9425        Self::DEFAULT.clone()
9426    }
9427}
9428impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9429    type Message = MavMessage;
9430    const ID: u32 = 396u32;
9431    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9432    const EXTRA_CRC: u8 = 50u8;
9433    const ENCODED_LEN: usize = 160usize;
9434    fn deser(
9435        _version: MavlinkVersion,
9436        __input: &[u8],
9437    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9438        let avail_len = __input.len();
9439        let mut payload_buf = [0; Self::ENCODED_LEN];
9440        let mut buf = if avail_len < Self::ENCODED_LEN {
9441            payload_buf[0..avail_len].copy_from_slice(__input);
9442            Bytes::new(&payload_buf)
9443        } else {
9444            Bytes::new(__input)
9445        };
9446        let mut __struct = Self::default();
9447        let tmp = buf.get_u64_le();
9448        __struct.capabilities = MavProtocolCapability::from_bits(
9449            tmp & MavProtocolCapability::all().bits(),
9450        )
9451        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9452            flag_type: "MavProtocolCapability",
9453            value: tmp as u32,
9454        })?;
9455        __struct.time_boot_ms = buf.get_u32_le();
9456        __struct.time_manufacture_s = buf.get_u32_le();
9457        for v in &mut __struct.vendor_name {
9458            let val = buf.get_u8();
9459            *v = val;
9460        }
9461        for v in &mut __struct.model_name {
9462            let val = buf.get_u8();
9463            *v = val;
9464        }
9465        for v in &mut __struct.software_version {
9466            let val = buf.get_u8();
9467            *v = val;
9468        }
9469        for v in &mut __struct.hardware_version {
9470            let val = buf.get_u8();
9471            *v = val;
9472        }
9473        for v in &mut __struct.serial_number {
9474            let val = buf.get_u8();
9475            *v = val;
9476        }
9477        Ok(__struct)
9478    }
9479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9480        let mut __tmp = BytesMut::new(bytes);
9481        #[allow(clippy::absurd_extreme_comparisons)]
9482        #[allow(unused_comparisons)]
9483        if __tmp.remaining() < Self::ENCODED_LEN {
9484            panic!(
9485                "buffer is too small (need {} bytes, but got {})",
9486                Self::ENCODED_LEN,
9487                __tmp.remaining(),
9488            )
9489        }
9490        __tmp.put_u64_le(self.capabilities.bits());
9491        __tmp.put_u32_le(self.time_boot_ms);
9492        __tmp.put_u32_le(self.time_manufacture_s);
9493        for val in &self.vendor_name {
9494            __tmp.put_u8(*val);
9495        }
9496        for val in &self.model_name {
9497            __tmp.put_u8(*val);
9498        }
9499        for val in &self.software_version {
9500            __tmp.put_u8(*val);
9501        }
9502        for val in &self.hardware_version {
9503            __tmp.put_u8(*val);
9504        }
9505        for val in &self.serial_number {
9506            __tmp.put_u8(*val);
9507        }
9508        if matches!(version, MavlinkVersion::V2) {
9509            let len = __tmp.len();
9510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9511        } else {
9512            __tmp.len()
9513        }
9514    }
9515}
9516#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9517#[doc = ""]
9518#[doc = "ID: 397"]
9519#[derive(Debug, Clone, PartialEq)]
9520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9522pub struct COMPONENT_METADATA_DATA {
9523    #[doc = "Timestamp (time since system boot)."]
9524    pub time_boot_ms: u32,
9525    #[doc = "CRC32 of the general metadata file."]
9526    pub file_crc: u32,
9527    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9529    pub uri: [u8; 100],
9530}
9531impl COMPONENT_METADATA_DATA {
9532    pub const ENCODED_LEN: usize = 108usize;
9533    pub const DEFAULT: Self = Self {
9534        time_boot_ms: 0_u32,
9535        file_crc: 0_u32,
9536        uri: [0_u8; 100usize],
9537    };
9538    #[cfg(feature = "arbitrary")]
9539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9540        use arbitrary::{Arbitrary, Unstructured};
9541        let mut buf = [0u8; 1024];
9542        rng.fill_bytes(&mut buf);
9543        let mut unstructured = Unstructured::new(&buf);
9544        Self::arbitrary(&mut unstructured).unwrap_or_default()
9545    }
9546}
9547impl Default for COMPONENT_METADATA_DATA {
9548    fn default() -> Self {
9549        Self::DEFAULT.clone()
9550    }
9551}
9552impl MessageData for COMPONENT_METADATA_DATA {
9553    type Message = MavMessage;
9554    const ID: u32 = 397u32;
9555    const NAME: &'static str = "COMPONENT_METADATA";
9556    const EXTRA_CRC: u8 = 182u8;
9557    const ENCODED_LEN: usize = 108usize;
9558    fn deser(
9559        _version: MavlinkVersion,
9560        __input: &[u8],
9561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9562        let avail_len = __input.len();
9563        let mut payload_buf = [0; Self::ENCODED_LEN];
9564        let mut buf = if avail_len < Self::ENCODED_LEN {
9565            payload_buf[0..avail_len].copy_from_slice(__input);
9566            Bytes::new(&payload_buf)
9567        } else {
9568            Bytes::new(__input)
9569        };
9570        let mut __struct = Self::default();
9571        __struct.time_boot_ms = buf.get_u32_le();
9572        __struct.file_crc = buf.get_u32_le();
9573        for v in &mut __struct.uri {
9574            let val = buf.get_u8();
9575            *v = val;
9576        }
9577        Ok(__struct)
9578    }
9579    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9580        let mut __tmp = BytesMut::new(bytes);
9581        #[allow(clippy::absurd_extreme_comparisons)]
9582        #[allow(unused_comparisons)]
9583        if __tmp.remaining() < Self::ENCODED_LEN {
9584            panic!(
9585                "buffer is too small (need {} bytes, but got {})",
9586                Self::ENCODED_LEN,
9587                __tmp.remaining(),
9588            )
9589        }
9590        __tmp.put_u32_le(self.time_boot_ms);
9591        __tmp.put_u32_le(self.file_crc);
9592        for val in &self.uri {
9593            __tmp.put_u8(*val);
9594        }
9595        if matches!(version, MavlinkVersion::V2) {
9596            let len = __tmp.len();
9597            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9598        } else {
9599            __tmp.len()
9600        }
9601    }
9602}
9603#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9604#[doc = ""]
9605#[doc = "ID: 146"]
9606#[derive(Debug, Clone, PartialEq)]
9607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9609pub struct CONTROL_SYSTEM_STATE_DATA {
9610    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9611    pub time_usec: u64,
9612    #[doc = "X acceleration in body frame"]
9613    pub x_acc: f32,
9614    #[doc = "Y acceleration in body frame"]
9615    pub y_acc: f32,
9616    #[doc = "Z acceleration in body frame"]
9617    pub z_acc: f32,
9618    #[doc = "X velocity in body frame"]
9619    pub x_vel: f32,
9620    #[doc = "Y velocity in body frame"]
9621    pub y_vel: f32,
9622    #[doc = "Z velocity in body frame"]
9623    pub z_vel: f32,
9624    #[doc = "X position in local frame"]
9625    pub x_pos: f32,
9626    #[doc = "Y position in local frame"]
9627    pub y_pos: f32,
9628    #[doc = "Z position in local frame"]
9629    pub z_pos: f32,
9630    #[doc = "Airspeed, set to -1 if unknown"]
9631    pub airspeed: f32,
9632    #[doc = "Variance of body velocity estimate"]
9633    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9634    pub vel_variance: [f32; 3],
9635    #[doc = "Variance in local position"]
9636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9637    pub pos_variance: [f32; 3],
9638    #[doc = "The attitude, represented as Quaternion"]
9639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9640    pub q: [f32; 4],
9641    #[doc = "Angular rate in roll axis"]
9642    pub roll_rate: f32,
9643    #[doc = "Angular rate in pitch axis"]
9644    pub pitch_rate: f32,
9645    #[doc = "Angular rate in yaw axis"]
9646    pub yaw_rate: f32,
9647}
9648impl CONTROL_SYSTEM_STATE_DATA {
9649    pub const ENCODED_LEN: usize = 100usize;
9650    pub const DEFAULT: Self = Self {
9651        time_usec: 0_u64,
9652        x_acc: 0.0_f32,
9653        y_acc: 0.0_f32,
9654        z_acc: 0.0_f32,
9655        x_vel: 0.0_f32,
9656        y_vel: 0.0_f32,
9657        z_vel: 0.0_f32,
9658        x_pos: 0.0_f32,
9659        y_pos: 0.0_f32,
9660        z_pos: 0.0_f32,
9661        airspeed: 0.0_f32,
9662        vel_variance: [0.0_f32; 3usize],
9663        pos_variance: [0.0_f32; 3usize],
9664        q: [0.0_f32; 4usize],
9665        roll_rate: 0.0_f32,
9666        pitch_rate: 0.0_f32,
9667        yaw_rate: 0.0_f32,
9668    };
9669    #[cfg(feature = "arbitrary")]
9670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9671        use arbitrary::{Arbitrary, Unstructured};
9672        let mut buf = [0u8; 1024];
9673        rng.fill_bytes(&mut buf);
9674        let mut unstructured = Unstructured::new(&buf);
9675        Self::arbitrary(&mut unstructured).unwrap_or_default()
9676    }
9677}
9678impl Default for CONTROL_SYSTEM_STATE_DATA {
9679    fn default() -> Self {
9680        Self::DEFAULT.clone()
9681    }
9682}
9683impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9684    type Message = MavMessage;
9685    const ID: u32 = 146u32;
9686    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9687    const EXTRA_CRC: u8 = 103u8;
9688    const ENCODED_LEN: usize = 100usize;
9689    fn deser(
9690        _version: MavlinkVersion,
9691        __input: &[u8],
9692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9693        let avail_len = __input.len();
9694        let mut payload_buf = [0; Self::ENCODED_LEN];
9695        let mut buf = if avail_len < Self::ENCODED_LEN {
9696            payload_buf[0..avail_len].copy_from_slice(__input);
9697            Bytes::new(&payload_buf)
9698        } else {
9699            Bytes::new(__input)
9700        };
9701        let mut __struct = Self::default();
9702        __struct.time_usec = buf.get_u64_le();
9703        __struct.x_acc = buf.get_f32_le();
9704        __struct.y_acc = buf.get_f32_le();
9705        __struct.z_acc = buf.get_f32_le();
9706        __struct.x_vel = buf.get_f32_le();
9707        __struct.y_vel = buf.get_f32_le();
9708        __struct.z_vel = buf.get_f32_le();
9709        __struct.x_pos = buf.get_f32_le();
9710        __struct.y_pos = buf.get_f32_le();
9711        __struct.z_pos = buf.get_f32_le();
9712        __struct.airspeed = buf.get_f32_le();
9713        for v in &mut __struct.vel_variance {
9714            let val = buf.get_f32_le();
9715            *v = val;
9716        }
9717        for v in &mut __struct.pos_variance {
9718            let val = buf.get_f32_le();
9719            *v = val;
9720        }
9721        for v in &mut __struct.q {
9722            let val = buf.get_f32_le();
9723            *v = val;
9724        }
9725        __struct.roll_rate = buf.get_f32_le();
9726        __struct.pitch_rate = buf.get_f32_le();
9727        __struct.yaw_rate = buf.get_f32_le();
9728        Ok(__struct)
9729    }
9730    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9731        let mut __tmp = BytesMut::new(bytes);
9732        #[allow(clippy::absurd_extreme_comparisons)]
9733        #[allow(unused_comparisons)]
9734        if __tmp.remaining() < Self::ENCODED_LEN {
9735            panic!(
9736                "buffer is too small (need {} bytes, but got {})",
9737                Self::ENCODED_LEN,
9738                __tmp.remaining(),
9739            )
9740        }
9741        __tmp.put_u64_le(self.time_usec);
9742        __tmp.put_f32_le(self.x_acc);
9743        __tmp.put_f32_le(self.y_acc);
9744        __tmp.put_f32_le(self.z_acc);
9745        __tmp.put_f32_le(self.x_vel);
9746        __tmp.put_f32_le(self.y_vel);
9747        __tmp.put_f32_le(self.z_vel);
9748        __tmp.put_f32_le(self.x_pos);
9749        __tmp.put_f32_le(self.y_pos);
9750        __tmp.put_f32_le(self.z_pos);
9751        __tmp.put_f32_le(self.airspeed);
9752        for val in &self.vel_variance {
9753            __tmp.put_f32_le(*val);
9754        }
9755        for val in &self.pos_variance {
9756            __tmp.put_f32_le(*val);
9757        }
9758        for val in &self.q {
9759            __tmp.put_f32_le(*val);
9760        }
9761        __tmp.put_f32_le(self.roll_rate);
9762        __tmp.put_f32_le(self.pitch_rate);
9763        __tmp.put_f32_le(self.yaw_rate);
9764        if matches!(version, MavlinkVersion::V2) {
9765            let len = __tmp.len();
9766            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9767        } else {
9768            __tmp.len()
9769        }
9770    }
9771}
9772#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9773#[doc = ""]
9774#[doc = "ID: 411"]
9775#[derive(Debug, Clone, PartialEq)]
9776#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9777#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9778pub struct CURRENT_EVENT_SEQUENCE_DATA {
9779    #[doc = "Sequence number."]
9780    pub sequence: u16,
9781    #[doc = "Flag bitset."]
9782    pub flags: MavEventCurrentSequenceFlags,
9783}
9784impl CURRENT_EVENT_SEQUENCE_DATA {
9785    pub const ENCODED_LEN: usize = 3usize;
9786    pub const DEFAULT: Self = Self {
9787        sequence: 0_u16,
9788        flags: MavEventCurrentSequenceFlags::DEFAULT,
9789    };
9790    #[cfg(feature = "arbitrary")]
9791    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9792        use arbitrary::{Arbitrary, Unstructured};
9793        let mut buf = [0u8; 1024];
9794        rng.fill_bytes(&mut buf);
9795        let mut unstructured = Unstructured::new(&buf);
9796        Self::arbitrary(&mut unstructured).unwrap_or_default()
9797    }
9798}
9799impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9800    fn default() -> Self {
9801        Self::DEFAULT.clone()
9802    }
9803}
9804impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9805    type Message = MavMessage;
9806    const ID: u32 = 411u32;
9807    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9808    const EXTRA_CRC: u8 = 106u8;
9809    const ENCODED_LEN: usize = 3usize;
9810    fn deser(
9811        _version: MavlinkVersion,
9812        __input: &[u8],
9813    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9814        let avail_len = __input.len();
9815        let mut payload_buf = [0; Self::ENCODED_LEN];
9816        let mut buf = if avail_len < Self::ENCODED_LEN {
9817            payload_buf[0..avail_len].copy_from_slice(__input);
9818            Bytes::new(&payload_buf)
9819        } else {
9820            Bytes::new(__input)
9821        };
9822        let mut __struct = Self::default();
9823        __struct.sequence = buf.get_u16_le();
9824        let tmp = buf.get_u8();
9825        __struct.flags =
9826            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9827                enum_type: "MavEventCurrentSequenceFlags",
9828                value: tmp as u32,
9829            })?;
9830        Ok(__struct)
9831    }
9832    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9833        let mut __tmp = BytesMut::new(bytes);
9834        #[allow(clippy::absurd_extreme_comparisons)]
9835        #[allow(unused_comparisons)]
9836        if __tmp.remaining() < Self::ENCODED_LEN {
9837            panic!(
9838                "buffer is too small (need {} bytes, but got {})",
9839                Self::ENCODED_LEN,
9840                __tmp.remaining(),
9841            )
9842        }
9843        __tmp.put_u16_le(self.sequence);
9844        __tmp.put_u8(self.flags as u8);
9845        if matches!(version, MavlinkVersion::V2) {
9846            let len = __tmp.len();
9847            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9848        } else {
9849            __tmp.len()
9850        }
9851    }
9852}
9853#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9854#[doc = ""]
9855#[doc = "ID: 436"]
9856#[derive(Debug, Clone, PartialEq)]
9857#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9858#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9859pub struct CURRENT_MODE_DATA {
9860    #[doc = "A bitfield for use for autopilot-specific flags"]
9861    pub custom_mode: u32,
9862    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9863    pub intended_custom_mode: u32,
9864    #[doc = "Standard mode."]
9865    pub standard_mode: MavStandardMode,
9866}
9867impl CURRENT_MODE_DATA {
9868    pub const ENCODED_LEN: usize = 9usize;
9869    pub const DEFAULT: Self = Self {
9870        custom_mode: 0_u32,
9871        intended_custom_mode: 0_u32,
9872        standard_mode: MavStandardMode::DEFAULT,
9873    };
9874    #[cfg(feature = "arbitrary")]
9875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9876        use arbitrary::{Arbitrary, Unstructured};
9877        let mut buf = [0u8; 1024];
9878        rng.fill_bytes(&mut buf);
9879        let mut unstructured = Unstructured::new(&buf);
9880        Self::arbitrary(&mut unstructured).unwrap_or_default()
9881    }
9882}
9883impl Default for CURRENT_MODE_DATA {
9884    fn default() -> Self {
9885        Self::DEFAULT.clone()
9886    }
9887}
9888impl MessageData for CURRENT_MODE_DATA {
9889    type Message = MavMessage;
9890    const ID: u32 = 436u32;
9891    const NAME: &'static str = "CURRENT_MODE";
9892    const EXTRA_CRC: u8 = 193u8;
9893    const ENCODED_LEN: usize = 9usize;
9894    fn deser(
9895        _version: MavlinkVersion,
9896        __input: &[u8],
9897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9898        let avail_len = __input.len();
9899        let mut payload_buf = [0; Self::ENCODED_LEN];
9900        let mut buf = if avail_len < Self::ENCODED_LEN {
9901            payload_buf[0..avail_len].copy_from_slice(__input);
9902            Bytes::new(&payload_buf)
9903        } else {
9904            Bytes::new(__input)
9905        };
9906        let mut __struct = Self::default();
9907        __struct.custom_mode = buf.get_u32_le();
9908        __struct.intended_custom_mode = buf.get_u32_le();
9909        let tmp = buf.get_u8();
9910        __struct.standard_mode =
9911            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9912                enum_type: "MavStandardMode",
9913                value: tmp as u32,
9914            })?;
9915        Ok(__struct)
9916    }
9917    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9918        let mut __tmp = BytesMut::new(bytes);
9919        #[allow(clippy::absurd_extreme_comparisons)]
9920        #[allow(unused_comparisons)]
9921        if __tmp.remaining() < Self::ENCODED_LEN {
9922            panic!(
9923                "buffer is too small (need {} bytes, but got {})",
9924                Self::ENCODED_LEN,
9925                __tmp.remaining(),
9926            )
9927        }
9928        __tmp.put_u32_le(self.custom_mode);
9929        __tmp.put_u32_le(self.intended_custom_mode);
9930        __tmp.put_u8(self.standard_mode as u8);
9931        if matches!(version, MavlinkVersion::V2) {
9932            let len = __tmp.len();
9933            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9934        } else {
9935            __tmp.len()
9936        }
9937    }
9938}
9939#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9940#[doc = "Data stream status information."]
9941#[doc = ""]
9942#[doc = "ID: 67"]
9943#[derive(Debug, Clone, PartialEq)]
9944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9946pub struct DATA_STREAM_DATA {
9947    #[doc = "The message rate"]
9948    pub message_rate: u16,
9949    #[doc = "The ID of the requested data stream"]
9950    pub stream_id: u8,
9951    #[doc = "1 stream is enabled, 0 stream is stopped."]
9952    pub on_off: u8,
9953}
9954impl DATA_STREAM_DATA {
9955    pub const ENCODED_LEN: usize = 4usize;
9956    pub const DEFAULT: Self = Self {
9957        message_rate: 0_u16,
9958        stream_id: 0_u8,
9959        on_off: 0_u8,
9960    };
9961    #[cfg(feature = "arbitrary")]
9962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9963        use arbitrary::{Arbitrary, Unstructured};
9964        let mut buf = [0u8; 1024];
9965        rng.fill_bytes(&mut buf);
9966        let mut unstructured = Unstructured::new(&buf);
9967        Self::arbitrary(&mut unstructured).unwrap_or_default()
9968    }
9969}
9970impl Default for DATA_STREAM_DATA {
9971    fn default() -> Self {
9972        Self::DEFAULT.clone()
9973    }
9974}
9975impl MessageData for DATA_STREAM_DATA {
9976    type Message = MavMessage;
9977    const ID: u32 = 67u32;
9978    const NAME: &'static str = "DATA_STREAM";
9979    const EXTRA_CRC: u8 = 21u8;
9980    const ENCODED_LEN: usize = 4usize;
9981    fn deser(
9982        _version: MavlinkVersion,
9983        __input: &[u8],
9984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9985        let avail_len = __input.len();
9986        let mut payload_buf = [0; Self::ENCODED_LEN];
9987        let mut buf = if avail_len < Self::ENCODED_LEN {
9988            payload_buf[0..avail_len].copy_from_slice(__input);
9989            Bytes::new(&payload_buf)
9990        } else {
9991            Bytes::new(__input)
9992        };
9993        let mut __struct = Self::default();
9994        __struct.message_rate = buf.get_u16_le();
9995        __struct.stream_id = buf.get_u8();
9996        __struct.on_off = buf.get_u8();
9997        Ok(__struct)
9998    }
9999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10000        let mut __tmp = BytesMut::new(bytes);
10001        #[allow(clippy::absurd_extreme_comparisons)]
10002        #[allow(unused_comparisons)]
10003        if __tmp.remaining() < Self::ENCODED_LEN {
10004            panic!(
10005                "buffer is too small (need {} bytes, but got {})",
10006                Self::ENCODED_LEN,
10007                __tmp.remaining(),
10008            )
10009        }
10010        __tmp.put_u16_le(self.message_rate);
10011        __tmp.put_u8(self.stream_id);
10012        __tmp.put_u8(self.on_off);
10013        if matches!(version, MavlinkVersion::V2) {
10014            let len = __tmp.len();
10015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10016        } else {
10017            __tmp.len()
10018        }
10019    }
10020}
10021#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10022#[doc = ""]
10023#[doc = "ID: 130"]
10024#[derive(Debug, Clone, PartialEq)]
10025#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10026#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10027pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
10028    #[doc = "total data size (set on ACK only)."]
10029    pub size: u32,
10030    #[doc = "Width of a matrix or image."]
10031    pub width: u16,
10032    #[doc = "Height of a matrix or image."]
10033    pub height: u16,
10034    #[doc = "Number of packets being sent (set on ACK only)."]
10035    pub packets: u16,
10036    #[doc = "Type of requested/acknowledged data."]
10037    pub mavtype: MavlinkDataStreamType,
10038    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
10039    pub payload: u8,
10040    #[doc = "JPEG quality. Values: [1-100]."]
10041    pub jpg_quality: u8,
10042}
10043impl DATA_TRANSMISSION_HANDSHAKE_DATA {
10044    pub const ENCODED_LEN: usize = 13usize;
10045    pub const DEFAULT: Self = Self {
10046        size: 0_u32,
10047        width: 0_u16,
10048        height: 0_u16,
10049        packets: 0_u16,
10050        mavtype: MavlinkDataStreamType::DEFAULT,
10051        payload: 0_u8,
10052        jpg_quality: 0_u8,
10053    };
10054    #[cfg(feature = "arbitrary")]
10055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10056        use arbitrary::{Arbitrary, Unstructured};
10057        let mut buf = [0u8; 1024];
10058        rng.fill_bytes(&mut buf);
10059        let mut unstructured = Unstructured::new(&buf);
10060        Self::arbitrary(&mut unstructured).unwrap_or_default()
10061    }
10062}
10063impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10064    fn default() -> Self {
10065        Self::DEFAULT.clone()
10066    }
10067}
10068impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10069    type Message = MavMessage;
10070    const ID: u32 = 130u32;
10071    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10072    const EXTRA_CRC: u8 = 29u8;
10073    const ENCODED_LEN: usize = 13usize;
10074    fn deser(
10075        _version: MavlinkVersion,
10076        __input: &[u8],
10077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10078        let avail_len = __input.len();
10079        let mut payload_buf = [0; Self::ENCODED_LEN];
10080        let mut buf = if avail_len < Self::ENCODED_LEN {
10081            payload_buf[0..avail_len].copy_from_slice(__input);
10082            Bytes::new(&payload_buf)
10083        } else {
10084            Bytes::new(__input)
10085        };
10086        let mut __struct = Self::default();
10087        __struct.size = buf.get_u32_le();
10088        __struct.width = buf.get_u16_le();
10089        __struct.height = buf.get_u16_le();
10090        __struct.packets = buf.get_u16_le();
10091        let tmp = buf.get_u8();
10092        __struct.mavtype =
10093            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10094                enum_type: "MavlinkDataStreamType",
10095                value: tmp as u32,
10096            })?;
10097        __struct.payload = buf.get_u8();
10098        __struct.jpg_quality = buf.get_u8();
10099        Ok(__struct)
10100    }
10101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10102        let mut __tmp = BytesMut::new(bytes);
10103        #[allow(clippy::absurd_extreme_comparisons)]
10104        #[allow(unused_comparisons)]
10105        if __tmp.remaining() < Self::ENCODED_LEN {
10106            panic!(
10107                "buffer is too small (need {} bytes, but got {})",
10108                Self::ENCODED_LEN,
10109                __tmp.remaining(),
10110            )
10111        }
10112        __tmp.put_u32_le(self.size);
10113        __tmp.put_u16_le(self.width);
10114        __tmp.put_u16_le(self.height);
10115        __tmp.put_u16_le(self.packets);
10116        __tmp.put_u8(self.mavtype as u8);
10117        __tmp.put_u8(self.payload);
10118        __tmp.put_u8(self.jpg_quality);
10119        if matches!(version, MavlinkVersion::V2) {
10120            let len = __tmp.len();
10121            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10122        } else {
10123            __tmp.len()
10124        }
10125    }
10126}
10127#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10128#[doc = ""]
10129#[doc = "ID: 254"]
10130#[derive(Debug, Clone, PartialEq)]
10131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10133pub struct DEBUG_DATA {
10134    #[doc = "Timestamp (time since system boot)."]
10135    pub time_boot_ms: u32,
10136    #[doc = "DEBUG value"]
10137    pub value: f32,
10138    #[doc = "index of debug variable"]
10139    pub ind: u8,
10140}
10141impl DEBUG_DATA {
10142    pub const ENCODED_LEN: usize = 9usize;
10143    pub const DEFAULT: Self = Self {
10144        time_boot_ms: 0_u32,
10145        value: 0.0_f32,
10146        ind: 0_u8,
10147    };
10148    #[cfg(feature = "arbitrary")]
10149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10150        use arbitrary::{Arbitrary, Unstructured};
10151        let mut buf = [0u8; 1024];
10152        rng.fill_bytes(&mut buf);
10153        let mut unstructured = Unstructured::new(&buf);
10154        Self::arbitrary(&mut unstructured).unwrap_or_default()
10155    }
10156}
10157impl Default for DEBUG_DATA {
10158    fn default() -> Self {
10159        Self::DEFAULT.clone()
10160    }
10161}
10162impl MessageData for DEBUG_DATA {
10163    type Message = MavMessage;
10164    const ID: u32 = 254u32;
10165    const NAME: &'static str = "DEBUG";
10166    const EXTRA_CRC: u8 = 46u8;
10167    const ENCODED_LEN: usize = 9usize;
10168    fn deser(
10169        _version: MavlinkVersion,
10170        __input: &[u8],
10171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10172        let avail_len = __input.len();
10173        let mut payload_buf = [0; Self::ENCODED_LEN];
10174        let mut buf = if avail_len < Self::ENCODED_LEN {
10175            payload_buf[0..avail_len].copy_from_slice(__input);
10176            Bytes::new(&payload_buf)
10177        } else {
10178            Bytes::new(__input)
10179        };
10180        let mut __struct = Self::default();
10181        __struct.time_boot_ms = buf.get_u32_le();
10182        __struct.value = buf.get_f32_le();
10183        __struct.ind = buf.get_u8();
10184        Ok(__struct)
10185    }
10186    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10187        let mut __tmp = BytesMut::new(bytes);
10188        #[allow(clippy::absurd_extreme_comparisons)]
10189        #[allow(unused_comparisons)]
10190        if __tmp.remaining() < Self::ENCODED_LEN {
10191            panic!(
10192                "buffer is too small (need {} bytes, but got {})",
10193                Self::ENCODED_LEN,
10194                __tmp.remaining(),
10195            )
10196        }
10197        __tmp.put_u32_le(self.time_boot_ms);
10198        __tmp.put_f32_le(self.value);
10199        __tmp.put_u8(self.ind);
10200        if matches!(version, MavlinkVersion::V2) {
10201            let len = __tmp.len();
10202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10203        } else {
10204            __tmp.len()
10205        }
10206    }
10207}
10208#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10209#[doc = ""]
10210#[doc = "ID: 350"]
10211#[derive(Debug, Clone, PartialEq)]
10212#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10213#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10214pub struct DEBUG_FLOAT_ARRAY_DATA {
10215    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10216    pub time_usec: u64,
10217    #[doc = "Unique ID used to discriminate between arrays"]
10218    pub array_id: u16,
10219    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10220    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10221    pub name: [u8; 10],
10222    #[doc = "data"]
10223    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10224    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10225    pub data: [f32; 58],
10226}
10227impl DEBUG_FLOAT_ARRAY_DATA {
10228    pub const ENCODED_LEN: usize = 252usize;
10229    pub const DEFAULT: Self = Self {
10230        time_usec: 0_u64,
10231        array_id: 0_u16,
10232        name: [0_u8; 10usize],
10233        data: [0.0_f32; 58usize],
10234    };
10235    #[cfg(feature = "arbitrary")]
10236    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10237        use arbitrary::{Arbitrary, Unstructured};
10238        let mut buf = [0u8; 1024];
10239        rng.fill_bytes(&mut buf);
10240        let mut unstructured = Unstructured::new(&buf);
10241        Self::arbitrary(&mut unstructured).unwrap_or_default()
10242    }
10243}
10244impl Default for DEBUG_FLOAT_ARRAY_DATA {
10245    fn default() -> Self {
10246        Self::DEFAULT.clone()
10247    }
10248}
10249impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10250    type Message = MavMessage;
10251    const ID: u32 = 350u32;
10252    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10253    const EXTRA_CRC: u8 = 232u8;
10254    const ENCODED_LEN: usize = 252usize;
10255    fn deser(
10256        _version: MavlinkVersion,
10257        __input: &[u8],
10258    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10259        let avail_len = __input.len();
10260        let mut payload_buf = [0; Self::ENCODED_LEN];
10261        let mut buf = if avail_len < Self::ENCODED_LEN {
10262            payload_buf[0..avail_len].copy_from_slice(__input);
10263            Bytes::new(&payload_buf)
10264        } else {
10265            Bytes::new(__input)
10266        };
10267        let mut __struct = Self::default();
10268        __struct.time_usec = buf.get_u64_le();
10269        __struct.array_id = buf.get_u16_le();
10270        for v in &mut __struct.name {
10271            let val = buf.get_u8();
10272            *v = val;
10273        }
10274        for v in &mut __struct.data {
10275            let val = buf.get_f32_le();
10276            *v = val;
10277        }
10278        Ok(__struct)
10279    }
10280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10281        let mut __tmp = BytesMut::new(bytes);
10282        #[allow(clippy::absurd_extreme_comparisons)]
10283        #[allow(unused_comparisons)]
10284        if __tmp.remaining() < Self::ENCODED_LEN {
10285            panic!(
10286                "buffer is too small (need {} bytes, but got {})",
10287                Self::ENCODED_LEN,
10288                __tmp.remaining(),
10289            )
10290        }
10291        __tmp.put_u64_le(self.time_usec);
10292        __tmp.put_u16_le(self.array_id);
10293        for val in &self.name {
10294            __tmp.put_u8(*val);
10295        }
10296        for val in &self.data {
10297            __tmp.put_f32_le(*val);
10298        }
10299        if matches!(version, MavlinkVersion::V2) {
10300            let len = __tmp.len();
10301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10302        } else {
10303            __tmp.len()
10304        }
10305    }
10306}
10307#[doc = "To debug something using a named 3D vector."]
10308#[doc = ""]
10309#[doc = "ID: 250"]
10310#[derive(Debug, Clone, PartialEq)]
10311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10312#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10313pub struct DEBUG_VECT_DATA {
10314    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10315    pub time_usec: u64,
10316    #[doc = "x"]
10317    pub x: f32,
10318    #[doc = "y"]
10319    pub y: f32,
10320    #[doc = "z"]
10321    pub z: f32,
10322    #[doc = "Name"]
10323    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10324    pub name: [u8; 10],
10325}
10326impl DEBUG_VECT_DATA {
10327    pub const ENCODED_LEN: usize = 30usize;
10328    pub const DEFAULT: Self = Self {
10329        time_usec: 0_u64,
10330        x: 0.0_f32,
10331        y: 0.0_f32,
10332        z: 0.0_f32,
10333        name: [0_u8; 10usize],
10334    };
10335    #[cfg(feature = "arbitrary")]
10336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10337        use arbitrary::{Arbitrary, Unstructured};
10338        let mut buf = [0u8; 1024];
10339        rng.fill_bytes(&mut buf);
10340        let mut unstructured = Unstructured::new(&buf);
10341        Self::arbitrary(&mut unstructured).unwrap_or_default()
10342    }
10343}
10344impl Default for DEBUG_VECT_DATA {
10345    fn default() -> Self {
10346        Self::DEFAULT.clone()
10347    }
10348}
10349impl MessageData for DEBUG_VECT_DATA {
10350    type Message = MavMessage;
10351    const ID: u32 = 250u32;
10352    const NAME: &'static str = "DEBUG_VECT";
10353    const EXTRA_CRC: u8 = 49u8;
10354    const ENCODED_LEN: usize = 30usize;
10355    fn deser(
10356        _version: MavlinkVersion,
10357        __input: &[u8],
10358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10359        let avail_len = __input.len();
10360        let mut payload_buf = [0; Self::ENCODED_LEN];
10361        let mut buf = if avail_len < Self::ENCODED_LEN {
10362            payload_buf[0..avail_len].copy_from_slice(__input);
10363            Bytes::new(&payload_buf)
10364        } else {
10365            Bytes::new(__input)
10366        };
10367        let mut __struct = Self::default();
10368        __struct.time_usec = buf.get_u64_le();
10369        __struct.x = buf.get_f32_le();
10370        __struct.y = buf.get_f32_le();
10371        __struct.z = buf.get_f32_le();
10372        for v in &mut __struct.name {
10373            let val = buf.get_u8();
10374            *v = val;
10375        }
10376        Ok(__struct)
10377    }
10378    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10379        let mut __tmp = BytesMut::new(bytes);
10380        #[allow(clippy::absurd_extreme_comparisons)]
10381        #[allow(unused_comparisons)]
10382        if __tmp.remaining() < Self::ENCODED_LEN {
10383            panic!(
10384                "buffer is too small (need {} bytes, but got {})",
10385                Self::ENCODED_LEN,
10386                __tmp.remaining(),
10387            )
10388        }
10389        __tmp.put_u64_le(self.time_usec);
10390        __tmp.put_f32_le(self.x);
10391        __tmp.put_f32_le(self.y);
10392        __tmp.put_f32_le(self.z);
10393        for val in &self.name {
10394            __tmp.put_u8(*val);
10395        }
10396        if matches!(version, MavlinkVersion::V2) {
10397            let len = __tmp.len();
10398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10399        } else {
10400            __tmp.len()
10401        }
10402    }
10403}
10404#[doc = "Distance sensor information for an onboard rangefinder."]
10405#[doc = ""]
10406#[doc = "ID: 132"]
10407#[derive(Debug, Clone, PartialEq)]
10408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10410pub struct DISTANCE_SENSOR_DATA {
10411    #[doc = "Timestamp (time since system boot)."]
10412    pub time_boot_ms: u32,
10413    #[doc = "Minimum distance the sensor can measure"]
10414    pub min_distance: u16,
10415    #[doc = "Maximum distance the sensor can measure"]
10416    pub max_distance: u16,
10417    #[doc = "Current distance reading"]
10418    pub current_distance: u16,
10419    #[doc = "Type of distance sensor."]
10420    pub mavtype: MavDistanceSensor,
10421    #[doc = "Onboard ID of the sensor"]
10422    pub id: u8,
10423    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10424    pub orientation: MavSensorOrientation,
10425    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10426    pub covariance: u8,
10427    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10428    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10429    pub horizontal_fov: f32,
10430    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10431    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10432    pub vertical_fov: f32,
10433    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10434    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10436    pub quaternion: [f32; 4],
10437    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10439    pub signal_quality: u8,
10440}
10441impl DISTANCE_SENSOR_DATA {
10442    pub const ENCODED_LEN: usize = 39usize;
10443    pub const DEFAULT: Self = Self {
10444        time_boot_ms: 0_u32,
10445        min_distance: 0_u16,
10446        max_distance: 0_u16,
10447        current_distance: 0_u16,
10448        mavtype: MavDistanceSensor::DEFAULT,
10449        id: 0_u8,
10450        orientation: MavSensorOrientation::DEFAULT,
10451        covariance: 0_u8,
10452        horizontal_fov: 0.0_f32,
10453        vertical_fov: 0.0_f32,
10454        quaternion: [0.0_f32; 4usize],
10455        signal_quality: 0_u8,
10456    };
10457    #[cfg(feature = "arbitrary")]
10458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10459        use arbitrary::{Arbitrary, Unstructured};
10460        let mut buf = [0u8; 1024];
10461        rng.fill_bytes(&mut buf);
10462        let mut unstructured = Unstructured::new(&buf);
10463        Self::arbitrary(&mut unstructured).unwrap_or_default()
10464    }
10465}
10466impl Default for DISTANCE_SENSOR_DATA {
10467    fn default() -> Self {
10468        Self::DEFAULT.clone()
10469    }
10470}
10471impl MessageData for DISTANCE_SENSOR_DATA {
10472    type Message = MavMessage;
10473    const ID: u32 = 132u32;
10474    const NAME: &'static str = "DISTANCE_SENSOR";
10475    const EXTRA_CRC: u8 = 85u8;
10476    const ENCODED_LEN: usize = 39usize;
10477    fn deser(
10478        _version: MavlinkVersion,
10479        __input: &[u8],
10480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10481        let avail_len = __input.len();
10482        let mut payload_buf = [0; Self::ENCODED_LEN];
10483        let mut buf = if avail_len < Self::ENCODED_LEN {
10484            payload_buf[0..avail_len].copy_from_slice(__input);
10485            Bytes::new(&payload_buf)
10486        } else {
10487            Bytes::new(__input)
10488        };
10489        let mut __struct = Self::default();
10490        __struct.time_boot_ms = buf.get_u32_le();
10491        __struct.min_distance = buf.get_u16_le();
10492        __struct.max_distance = buf.get_u16_le();
10493        __struct.current_distance = buf.get_u16_le();
10494        let tmp = buf.get_u8();
10495        __struct.mavtype =
10496            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10497                enum_type: "MavDistanceSensor",
10498                value: tmp as u32,
10499            })?;
10500        __struct.id = buf.get_u8();
10501        let tmp = buf.get_u8();
10502        __struct.orientation =
10503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10504                enum_type: "MavSensorOrientation",
10505                value: tmp as u32,
10506            })?;
10507        __struct.covariance = buf.get_u8();
10508        __struct.horizontal_fov = buf.get_f32_le();
10509        __struct.vertical_fov = buf.get_f32_le();
10510        for v in &mut __struct.quaternion {
10511            let val = buf.get_f32_le();
10512            *v = val;
10513        }
10514        __struct.signal_quality = buf.get_u8();
10515        Ok(__struct)
10516    }
10517    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10518        let mut __tmp = BytesMut::new(bytes);
10519        #[allow(clippy::absurd_extreme_comparisons)]
10520        #[allow(unused_comparisons)]
10521        if __tmp.remaining() < Self::ENCODED_LEN {
10522            panic!(
10523                "buffer is too small (need {} bytes, but got {})",
10524                Self::ENCODED_LEN,
10525                __tmp.remaining(),
10526            )
10527        }
10528        __tmp.put_u32_le(self.time_boot_ms);
10529        __tmp.put_u16_le(self.min_distance);
10530        __tmp.put_u16_le(self.max_distance);
10531        __tmp.put_u16_le(self.current_distance);
10532        __tmp.put_u8(self.mavtype as u8);
10533        __tmp.put_u8(self.id);
10534        __tmp.put_u8(self.orientation as u8);
10535        __tmp.put_u8(self.covariance);
10536        __tmp.put_f32_le(self.horizontal_fov);
10537        __tmp.put_f32_le(self.vertical_fov);
10538        for val in &self.quaternion {
10539            __tmp.put_f32_le(*val);
10540        }
10541        __tmp.put_u8(self.signal_quality);
10542        if matches!(version, MavlinkVersion::V2) {
10543            let len = __tmp.len();
10544            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10545        } else {
10546            __tmp.len()
10547        }
10548    }
10549}
10550#[doc = "EFI status output."]
10551#[doc = ""]
10552#[doc = "ID: 225"]
10553#[derive(Debug, Clone, PartialEq)]
10554#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10556pub struct EFI_STATUS_DATA {
10557    #[doc = "ECU index"]
10558    pub ecu_index: f32,
10559    #[doc = "RPM"]
10560    pub rpm: f32,
10561    #[doc = "Fuel consumed"]
10562    pub fuel_consumed: f32,
10563    #[doc = "Fuel flow rate"]
10564    pub fuel_flow: f32,
10565    #[doc = "Engine load"]
10566    pub engine_load: f32,
10567    #[doc = "Throttle position"]
10568    pub throttle_position: f32,
10569    #[doc = "Spark dwell time"]
10570    pub spark_dwell_time: f32,
10571    #[doc = "Barometric pressure"]
10572    pub barometric_pressure: f32,
10573    #[doc = "Intake manifold pressure("]
10574    pub intake_manifold_pressure: f32,
10575    #[doc = "Intake manifold temperature"]
10576    pub intake_manifold_temperature: f32,
10577    #[doc = "Cylinder head temperature"]
10578    pub cylinder_head_temperature: f32,
10579    #[doc = "Ignition timing (Crank angle degrees)"]
10580    pub ignition_timing: f32,
10581    #[doc = "Injection time"]
10582    pub injection_time: f32,
10583    #[doc = "Exhaust gas temperature"]
10584    pub exhaust_gas_temperature: f32,
10585    #[doc = "Output throttle"]
10586    pub throttle_out: f32,
10587    #[doc = "Pressure/temperature compensation"]
10588    pub pt_compensation: f32,
10589    #[doc = "EFI health status"]
10590    pub health: u8,
10591    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10592    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10593    pub ignition_voltage: f32,
10594    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10595    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10596    pub fuel_pressure: f32,
10597}
10598impl EFI_STATUS_DATA {
10599    pub const ENCODED_LEN: usize = 73usize;
10600    pub const DEFAULT: Self = Self {
10601        ecu_index: 0.0_f32,
10602        rpm: 0.0_f32,
10603        fuel_consumed: 0.0_f32,
10604        fuel_flow: 0.0_f32,
10605        engine_load: 0.0_f32,
10606        throttle_position: 0.0_f32,
10607        spark_dwell_time: 0.0_f32,
10608        barometric_pressure: 0.0_f32,
10609        intake_manifold_pressure: 0.0_f32,
10610        intake_manifold_temperature: 0.0_f32,
10611        cylinder_head_temperature: 0.0_f32,
10612        ignition_timing: 0.0_f32,
10613        injection_time: 0.0_f32,
10614        exhaust_gas_temperature: 0.0_f32,
10615        throttle_out: 0.0_f32,
10616        pt_compensation: 0.0_f32,
10617        health: 0_u8,
10618        ignition_voltage: 0.0_f32,
10619        fuel_pressure: 0.0_f32,
10620    };
10621    #[cfg(feature = "arbitrary")]
10622    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10623        use arbitrary::{Arbitrary, Unstructured};
10624        let mut buf = [0u8; 1024];
10625        rng.fill_bytes(&mut buf);
10626        let mut unstructured = Unstructured::new(&buf);
10627        Self::arbitrary(&mut unstructured).unwrap_or_default()
10628    }
10629}
10630impl Default for EFI_STATUS_DATA {
10631    fn default() -> Self {
10632        Self::DEFAULT.clone()
10633    }
10634}
10635impl MessageData for EFI_STATUS_DATA {
10636    type Message = MavMessage;
10637    const ID: u32 = 225u32;
10638    const NAME: &'static str = "EFI_STATUS";
10639    const EXTRA_CRC: u8 = 208u8;
10640    const ENCODED_LEN: usize = 73usize;
10641    fn deser(
10642        _version: MavlinkVersion,
10643        __input: &[u8],
10644    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10645        let avail_len = __input.len();
10646        let mut payload_buf = [0; Self::ENCODED_LEN];
10647        let mut buf = if avail_len < Self::ENCODED_LEN {
10648            payload_buf[0..avail_len].copy_from_slice(__input);
10649            Bytes::new(&payload_buf)
10650        } else {
10651            Bytes::new(__input)
10652        };
10653        let mut __struct = Self::default();
10654        __struct.ecu_index = buf.get_f32_le();
10655        __struct.rpm = buf.get_f32_le();
10656        __struct.fuel_consumed = buf.get_f32_le();
10657        __struct.fuel_flow = buf.get_f32_le();
10658        __struct.engine_load = buf.get_f32_le();
10659        __struct.throttle_position = buf.get_f32_le();
10660        __struct.spark_dwell_time = buf.get_f32_le();
10661        __struct.barometric_pressure = buf.get_f32_le();
10662        __struct.intake_manifold_pressure = buf.get_f32_le();
10663        __struct.intake_manifold_temperature = buf.get_f32_le();
10664        __struct.cylinder_head_temperature = buf.get_f32_le();
10665        __struct.ignition_timing = buf.get_f32_le();
10666        __struct.injection_time = buf.get_f32_le();
10667        __struct.exhaust_gas_temperature = buf.get_f32_le();
10668        __struct.throttle_out = buf.get_f32_le();
10669        __struct.pt_compensation = buf.get_f32_le();
10670        __struct.health = buf.get_u8();
10671        __struct.ignition_voltage = buf.get_f32_le();
10672        __struct.fuel_pressure = buf.get_f32_le();
10673        Ok(__struct)
10674    }
10675    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10676        let mut __tmp = BytesMut::new(bytes);
10677        #[allow(clippy::absurd_extreme_comparisons)]
10678        #[allow(unused_comparisons)]
10679        if __tmp.remaining() < Self::ENCODED_LEN {
10680            panic!(
10681                "buffer is too small (need {} bytes, but got {})",
10682                Self::ENCODED_LEN,
10683                __tmp.remaining(),
10684            )
10685        }
10686        __tmp.put_f32_le(self.ecu_index);
10687        __tmp.put_f32_le(self.rpm);
10688        __tmp.put_f32_le(self.fuel_consumed);
10689        __tmp.put_f32_le(self.fuel_flow);
10690        __tmp.put_f32_le(self.engine_load);
10691        __tmp.put_f32_le(self.throttle_position);
10692        __tmp.put_f32_le(self.spark_dwell_time);
10693        __tmp.put_f32_le(self.barometric_pressure);
10694        __tmp.put_f32_le(self.intake_manifold_pressure);
10695        __tmp.put_f32_le(self.intake_manifold_temperature);
10696        __tmp.put_f32_le(self.cylinder_head_temperature);
10697        __tmp.put_f32_le(self.ignition_timing);
10698        __tmp.put_f32_le(self.injection_time);
10699        __tmp.put_f32_le(self.exhaust_gas_temperature);
10700        __tmp.put_f32_le(self.throttle_out);
10701        __tmp.put_f32_le(self.pt_compensation);
10702        __tmp.put_u8(self.health);
10703        __tmp.put_f32_le(self.ignition_voltage);
10704        __tmp.put_f32_le(self.fuel_pressure);
10705        if matches!(version, MavlinkVersion::V2) {
10706            let len = __tmp.len();
10707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10708        } else {
10709            __tmp.len()
10710        }
10711    }
10712}
10713#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10714#[doc = ""]
10715#[doc = "ID: 131"]
10716#[derive(Debug, Clone, PartialEq)]
10717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10719pub struct ENCAPSULATED_DATA_DATA {
10720    #[doc = "sequence number (starting with 0 on every transmission)"]
10721    pub seqnr: u16,
10722    #[doc = "image data bytes"]
10723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10724    pub data: [u8; 253],
10725}
10726impl ENCAPSULATED_DATA_DATA {
10727    pub const ENCODED_LEN: usize = 255usize;
10728    pub const DEFAULT: Self = Self {
10729        seqnr: 0_u16,
10730        data: [0_u8; 253usize],
10731    };
10732    #[cfg(feature = "arbitrary")]
10733    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10734        use arbitrary::{Arbitrary, Unstructured};
10735        let mut buf = [0u8; 1024];
10736        rng.fill_bytes(&mut buf);
10737        let mut unstructured = Unstructured::new(&buf);
10738        Self::arbitrary(&mut unstructured).unwrap_or_default()
10739    }
10740}
10741impl Default for ENCAPSULATED_DATA_DATA {
10742    fn default() -> Self {
10743        Self::DEFAULT.clone()
10744    }
10745}
10746impl MessageData for ENCAPSULATED_DATA_DATA {
10747    type Message = MavMessage;
10748    const ID: u32 = 131u32;
10749    const NAME: &'static str = "ENCAPSULATED_DATA";
10750    const EXTRA_CRC: u8 = 223u8;
10751    const ENCODED_LEN: usize = 255usize;
10752    fn deser(
10753        _version: MavlinkVersion,
10754        __input: &[u8],
10755    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10756        let avail_len = __input.len();
10757        let mut payload_buf = [0; Self::ENCODED_LEN];
10758        let mut buf = if avail_len < Self::ENCODED_LEN {
10759            payload_buf[0..avail_len].copy_from_slice(__input);
10760            Bytes::new(&payload_buf)
10761        } else {
10762            Bytes::new(__input)
10763        };
10764        let mut __struct = Self::default();
10765        __struct.seqnr = buf.get_u16_le();
10766        for v in &mut __struct.data {
10767            let val = buf.get_u8();
10768            *v = val;
10769        }
10770        Ok(__struct)
10771    }
10772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10773        let mut __tmp = BytesMut::new(bytes);
10774        #[allow(clippy::absurd_extreme_comparisons)]
10775        #[allow(unused_comparisons)]
10776        if __tmp.remaining() < Self::ENCODED_LEN {
10777            panic!(
10778                "buffer is too small (need {} bytes, but got {})",
10779                Self::ENCODED_LEN,
10780                __tmp.remaining(),
10781            )
10782        }
10783        __tmp.put_u16_le(self.seqnr);
10784        for val in &self.data {
10785            __tmp.put_u8(*val);
10786        }
10787        if matches!(version, MavlinkVersion::V2) {
10788            let len = __tmp.len();
10789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10790        } else {
10791            __tmp.len()
10792        }
10793    }
10794}
10795#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10796#[doc = ""]
10797#[doc = "ID: 290"]
10798#[derive(Debug, Clone, PartialEq)]
10799#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10801pub struct ESC_INFO_DATA {
10802    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10803    pub time_usec: u64,
10804    #[doc = "Number of reported errors by each ESC since boot."]
10805    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10806    pub error_count: [u32; 4],
10807    #[doc = "Counter of data packets received."]
10808    pub counter: u16,
10809    #[doc = "Bitmap of ESC failure flags."]
10810    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10811    pub failure_flags: [u16; 4],
10812    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10814    pub temperature: [i16; 4],
10815    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10816    pub index: u8,
10817    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10818    pub count: u8,
10819    #[doc = "Connection type protocol for all ESC."]
10820    pub connection_type: EscConnectionType,
10821    #[doc = "Information regarding online/offline status of each ESC."]
10822    pub info: u8,
10823}
10824impl ESC_INFO_DATA {
10825    pub const ENCODED_LEN: usize = 46usize;
10826    pub const DEFAULT: Self = Self {
10827        time_usec: 0_u64,
10828        error_count: [0_u32; 4usize],
10829        counter: 0_u16,
10830        failure_flags: [0_u16; 4usize],
10831        temperature: [0_i16; 4usize],
10832        index: 0_u8,
10833        count: 0_u8,
10834        connection_type: EscConnectionType::DEFAULT,
10835        info: 0_u8,
10836    };
10837    #[cfg(feature = "arbitrary")]
10838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10839        use arbitrary::{Arbitrary, Unstructured};
10840        let mut buf = [0u8; 1024];
10841        rng.fill_bytes(&mut buf);
10842        let mut unstructured = Unstructured::new(&buf);
10843        Self::arbitrary(&mut unstructured).unwrap_or_default()
10844    }
10845}
10846impl Default for ESC_INFO_DATA {
10847    fn default() -> Self {
10848        Self::DEFAULT.clone()
10849    }
10850}
10851impl MessageData for ESC_INFO_DATA {
10852    type Message = MavMessage;
10853    const ID: u32 = 290u32;
10854    const NAME: &'static str = "ESC_INFO";
10855    const EXTRA_CRC: u8 = 251u8;
10856    const ENCODED_LEN: usize = 46usize;
10857    fn deser(
10858        _version: MavlinkVersion,
10859        __input: &[u8],
10860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10861        let avail_len = __input.len();
10862        let mut payload_buf = [0; Self::ENCODED_LEN];
10863        let mut buf = if avail_len < Self::ENCODED_LEN {
10864            payload_buf[0..avail_len].copy_from_slice(__input);
10865            Bytes::new(&payload_buf)
10866        } else {
10867            Bytes::new(__input)
10868        };
10869        let mut __struct = Self::default();
10870        __struct.time_usec = buf.get_u64_le();
10871        for v in &mut __struct.error_count {
10872            let val = buf.get_u32_le();
10873            *v = val;
10874        }
10875        __struct.counter = buf.get_u16_le();
10876        for v in &mut __struct.failure_flags {
10877            let val = buf.get_u16_le();
10878            *v = val;
10879        }
10880        for v in &mut __struct.temperature {
10881            let val = buf.get_i16_le();
10882            *v = val;
10883        }
10884        __struct.index = buf.get_u8();
10885        __struct.count = buf.get_u8();
10886        let tmp = buf.get_u8();
10887        __struct.connection_type =
10888            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10889                enum_type: "EscConnectionType",
10890                value: tmp as u32,
10891            })?;
10892        __struct.info = buf.get_u8();
10893        Ok(__struct)
10894    }
10895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10896        let mut __tmp = BytesMut::new(bytes);
10897        #[allow(clippy::absurd_extreme_comparisons)]
10898        #[allow(unused_comparisons)]
10899        if __tmp.remaining() < Self::ENCODED_LEN {
10900            panic!(
10901                "buffer is too small (need {} bytes, but got {})",
10902                Self::ENCODED_LEN,
10903                __tmp.remaining(),
10904            )
10905        }
10906        __tmp.put_u64_le(self.time_usec);
10907        for val in &self.error_count {
10908            __tmp.put_u32_le(*val);
10909        }
10910        __tmp.put_u16_le(self.counter);
10911        for val in &self.failure_flags {
10912            __tmp.put_u16_le(*val);
10913        }
10914        for val in &self.temperature {
10915            __tmp.put_i16_le(*val);
10916        }
10917        __tmp.put_u8(self.index);
10918        __tmp.put_u8(self.count);
10919        __tmp.put_u8(self.connection_type as u8);
10920        __tmp.put_u8(self.info);
10921        if matches!(version, MavlinkVersion::V2) {
10922            let len = __tmp.len();
10923            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10924        } else {
10925            __tmp.len()
10926        }
10927    }
10928}
10929#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10930#[doc = ""]
10931#[doc = "ID: 291"]
10932#[derive(Debug, Clone, PartialEq)]
10933#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10934#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10935pub struct ESC_STATUS_DATA {
10936    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10937    pub time_usec: u64,
10938    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10940    pub rpm: [i32; 4],
10941    #[doc = "Voltage measured from each ESC."]
10942    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10943    pub voltage: [f32; 4],
10944    #[doc = "Current measured from each ESC."]
10945    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10946    pub current: [f32; 4],
10947    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10948    pub index: u8,
10949}
10950impl ESC_STATUS_DATA {
10951    pub const ENCODED_LEN: usize = 57usize;
10952    pub const DEFAULT: Self = Self {
10953        time_usec: 0_u64,
10954        rpm: [0_i32; 4usize],
10955        voltage: [0.0_f32; 4usize],
10956        current: [0.0_f32; 4usize],
10957        index: 0_u8,
10958    };
10959    #[cfg(feature = "arbitrary")]
10960    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10961        use arbitrary::{Arbitrary, Unstructured};
10962        let mut buf = [0u8; 1024];
10963        rng.fill_bytes(&mut buf);
10964        let mut unstructured = Unstructured::new(&buf);
10965        Self::arbitrary(&mut unstructured).unwrap_or_default()
10966    }
10967}
10968impl Default for ESC_STATUS_DATA {
10969    fn default() -> Self {
10970        Self::DEFAULT.clone()
10971    }
10972}
10973impl MessageData for ESC_STATUS_DATA {
10974    type Message = MavMessage;
10975    const ID: u32 = 291u32;
10976    const NAME: &'static str = "ESC_STATUS";
10977    const EXTRA_CRC: u8 = 10u8;
10978    const ENCODED_LEN: usize = 57usize;
10979    fn deser(
10980        _version: MavlinkVersion,
10981        __input: &[u8],
10982    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10983        let avail_len = __input.len();
10984        let mut payload_buf = [0; Self::ENCODED_LEN];
10985        let mut buf = if avail_len < Self::ENCODED_LEN {
10986            payload_buf[0..avail_len].copy_from_slice(__input);
10987            Bytes::new(&payload_buf)
10988        } else {
10989            Bytes::new(__input)
10990        };
10991        let mut __struct = Self::default();
10992        __struct.time_usec = buf.get_u64_le();
10993        for v in &mut __struct.rpm {
10994            let val = buf.get_i32_le();
10995            *v = val;
10996        }
10997        for v in &mut __struct.voltage {
10998            let val = buf.get_f32_le();
10999            *v = val;
11000        }
11001        for v in &mut __struct.current {
11002            let val = buf.get_f32_le();
11003            *v = val;
11004        }
11005        __struct.index = buf.get_u8();
11006        Ok(__struct)
11007    }
11008    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11009        let mut __tmp = BytesMut::new(bytes);
11010        #[allow(clippy::absurd_extreme_comparisons)]
11011        #[allow(unused_comparisons)]
11012        if __tmp.remaining() < Self::ENCODED_LEN {
11013            panic!(
11014                "buffer is too small (need {} bytes, but got {})",
11015                Self::ENCODED_LEN,
11016                __tmp.remaining(),
11017            )
11018        }
11019        __tmp.put_u64_le(self.time_usec);
11020        for val in &self.rpm {
11021            __tmp.put_i32_le(*val);
11022        }
11023        for val in &self.voltage {
11024            __tmp.put_f32_le(*val);
11025        }
11026        for val in &self.current {
11027            __tmp.put_f32_le(*val);
11028        }
11029        __tmp.put_u8(self.index);
11030        if matches!(version, MavlinkVersion::V2) {
11031            let len = __tmp.len();
11032            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11033        } else {
11034            __tmp.len()
11035        }
11036    }
11037}
11038#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
11039#[doc = ""]
11040#[doc = "ID: 230"]
11041#[derive(Debug, Clone, PartialEq)]
11042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11044pub struct ESTIMATOR_STATUS_DATA {
11045    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
11046    pub time_usec: u64,
11047    #[doc = "Velocity innovation test ratio"]
11048    pub vel_ratio: f32,
11049    #[doc = "Horizontal position innovation test ratio"]
11050    pub pos_horiz_ratio: f32,
11051    #[doc = "Vertical position innovation test ratio"]
11052    pub pos_vert_ratio: f32,
11053    #[doc = "Magnetometer innovation test ratio"]
11054    pub mag_ratio: f32,
11055    #[doc = "Height above terrain innovation test ratio"]
11056    pub hagl_ratio: f32,
11057    #[doc = "True airspeed innovation test ratio"]
11058    pub tas_ratio: f32,
11059    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
11060    pub pos_horiz_accuracy: f32,
11061    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
11062    pub pos_vert_accuracy: f32,
11063    #[doc = "Bitmap indicating which EKF outputs are valid."]
11064    pub flags: EstimatorStatusFlags,
11065}
11066impl ESTIMATOR_STATUS_DATA {
11067    pub const ENCODED_LEN: usize = 42usize;
11068    pub const DEFAULT: Self = Self {
11069        time_usec: 0_u64,
11070        vel_ratio: 0.0_f32,
11071        pos_horiz_ratio: 0.0_f32,
11072        pos_vert_ratio: 0.0_f32,
11073        mag_ratio: 0.0_f32,
11074        hagl_ratio: 0.0_f32,
11075        tas_ratio: 0.0_f32,
11076        pos_horiz_accuracy: 0.0_f32,
11077        pos_vert_accuracy: 0.0_f32,
11078        flags: EstimatorStatusFlags::DEFAULT,
11079    };
11080    #[cfg(feature = "arbitrary")]
11081    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11082        use arbitrary::{Arbitrary, Unstructured};
11083        let mut buf = [0u8; 1024];
11084        rng.fill_bytes(&mut buf);
11085        let mut unstructured = Unstructured::new(&buf);
11086        Self::arbitrary(&mut unstructured).unwrap_or_default()
11087    }
11088}
11089impl Default for ESTIMATOR_STATUS_DATA {
11090    fn default() -> Self {
11091        Self::DEFAULT.clone()
11092    }
11093}
11094impl MessageData for ESTIMATOR_STATUS_DATA {
11095    type Message = MavMessage;
11096    const ID: u32 = 230u32;
11097    const NAME: &'static str = "ESTIMATOR_STATUS";
11098    const EXTRA_CRC: u8 = 163u8;
11099    const ENCODED_LEN: usize = 42usize;
11100    fn deser(
11101        _version: MavlinkVersion,
11102        __input: &[u8],
11103    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11104        let avail_len = __input.len();
11105        let mut payload_buf = [0; Self::ENCODED_LEN];
11106        let mut buf = if avail_len < Self::ENCODED_LEN {
11107            payload_buf[0..avail_len].copy_from_slice(__input);
11108            Bytes::new(&payload_buf)
11109        } else {
11110            Bytes::new(__input)
11111        };
11112        let mut __struct = Self::default();
11113        __struct.time_usec = buf.get_u64_le();
11114        __struct.vel_ratio = buf.get_f32_le();
11115        __struct.pos_horiz_ratio = buf.get_f32_le();
11116        __struct.pos_vert_ratio = buf.get_f32_le();
11117        __struct.mag_ratio = buf.get_f32_le();
11118        __struct.hagl_ratio = buf.get_f32_le();
11119        __struct.tas_ratio = buf.get_f32_le();
11120        __struct.pos_horiz_accuracy = buf.get_f32_le();
11121        __struct.pos_vert_accuracy = buf.get_f32_le();
11122        let tmp = buf.get_u16_le();
11123        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11124            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11125                flag_type: "EstimatorStatusFlags",
11126                value: tmp as u32,
11127            })?;
11128        Ok(__struct)
11129    }
11130    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11131        let mut __tmp = BytesMut::new(bytes);
11132        #[allow(clippy::absurd_extreme_comparisons)]
11133        #[allow(unused_comparisons)]
11134        if __tmp.remaining() < Self::ENCODED_LEN {
11135            panic!(
11136                "buffer is too small (need {} bytes, but got {})",
11137                Self::ENCODED_LEN,
11138                __tmp.remaining(),
11139            )
11140        }
11141        __tmp.put_u64_le(self.time_usec);
11142        __tmp.put_f32_le(self.vel_ratio);
11143        __tmp.put_f32_le(self.pos_horiz_ratio);
11144        __tmp.put_f32_le(self.pos_vert_ratio);
11145        __tmp.put_f32_le(self.mag_ratio);
11146        __tmp.put_f32_le(self.hagl_ratio);
11147        __tmp.put_f32_le(self.tas_ratio);
11148        __tmp.put_f32_le(self.pos_horiz_accuracy);
11149        __tmp.put_f32_le(self.pos_vert_accuracy);
11150        __tmp.put_u16_le(self.flags.bits());
11151        if matches!(version, MavlinkVersion::V2) {
11152            let len = __tmp.len();
11153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11154        } else {
11155            __tmp.len()
11156        }
11157    }
11158}
11159#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11160#[doc = ""]
11161#[doc = "ID: 410"]
11162#[derive(Debug, Clone, PartialEq)]
11163#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11164#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11165pub struct EVENT_DATA {
11166    #[doc = "Event ID (as defined in the component metadata)"]
11167    pub id: u32,
11168    #[doc = "Timestamp (time since system boot when the event happened)."]
11169    pub event_time_boot_ms: u32,
11170    #[doc = "Sequence number."]
11171    pub sequence: u16,
11172    #[doc = "Component ID"]
11173    pub destination_component: u8,
11174    #[doc = "System ID"]
11175    pub destination_system: u8,
11176    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11177    pub log_levels: u8,
11178    #[doc = "Arguments (depend on event ID)."]
11179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11180    pub arguments: [u8; 40],
11181}
11182impl EVENT_DATA {
11183    pub const ENCODED_LEN: usize = 53usize;
11184    pub const DEFAULT: Self = Self {
11185        id: 0_u32,
11186        event_time_boot_ms: 0_u32,
11187        sequence: 0_u16,
11188        destination_component: 0_u8,
11189        destination_system: 0_u8,
11190        log_levels: 0_u8,
11191        arguments: [0_u8; 40usize],
11192    };
11193    #[cfg(feature = "arbitrary")]
11194    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11195        use arbitrary::{Arbitrary, Unstructured};
11196        let mut buf = [0u8; 1024];
11197        rng.fill_bytes(&mut buf);
11198        let mut unstructured = Unstructured::new(&buf);
11199        Self::arbitrary(&mut unstructured).unwrap_or_default()
11200    }
11201}
11202impl Default for EVENT_DATA {
11203    fn default() -> Self {
11204        Self::DEFAULT.clone()
11205    }
11206}
11207impl MessageData for EVENT_DATA {
11208    type Message = MavMessage;
11209    const ID: u32 = 410u32;
11210    const NAME: &'static str = "EVENT";
11211    const EXTRA_CRC: u8 = 160u8;
11212    const ENCODED_LEN: usize = 53usize;
11213    fn deser(
11214        _version: MavlinkVersion,
11215        __input: &[u8],
11216    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11217        let avail_len = __input.len();
11218        let mut payload_buf = [0; Self::ENCODED_LEN];
11219        let mut buf = if avail_len < Self::ENCODED_LEN {
11220            payload_buf[0..avail_len].copy_from_slice(__input);
11221            Bytes::new(&payload_buf)
11222        } else {
11223            Bytes::new(__input)
11224        };
11225        let mut __struct = Self::default();
11226        __struct.id = buf.get_u32_le();
11227        __struct.event_time_boot_ms = buf.get_u32_le();
11228        __struct.sequence = buf.get_u16_le();
11229        __struct.destination_component = buf.get_u8();
11230        __struct.destination_system = buf.get_u8();
11231        __struct.log_levels = buf.get_u8();
11232        for v in &mut __struct.arguments {
11233            let val = buf.get_u8();
11234            *v = val;
11235        }
11236        Ok(__struct)
11237    }
11238    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11239        let mut __tmp = BytesMut::new(bytes);
11240        #[allow(clippy::absurd_extreme_comparisons)]
11241        #[allow(unused_comparisons)]
11242        if __tmp.remaining() < Self::ENCODED_LEN {
11243            panic!(
11244                "buffer is too small (need {} bytes, but got {})",
11245                Self::ENCODED_LEN,
11246                __tmp.remaining(),
11247            )
11248        }
11249        __tmp.put_u32_le(self.id);
11250        __tmp.put_u32_le(self.event_time_boot_ms);
11251        __tmp.put_u16_le(self.sequence);
11252        __tmp.put_u8(self.destination_component);
11253        __tmp.put_u8(self.destination_system);
11254        __tmp.put_u8(self.log_levels);
11255        for val in &self.arguments {
11256            __tmp.put_u8(*val);
11257        }
11258        if matches!(version, MavlinkVersion::V2) {
11259            let len = __tmp.len();
11260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11261        } else {
11262            __tmp.len()
11263        }
11264    }
11265}
11266#[doc = "Provides state for additional features."]
11267#[doc = ""]
11268#[doc = "ID: 245"]
11269#[derive(Debug, Clone, PartialEq)]
11270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11271#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11272pub struct EXTENDED_SYS_STATE_DATA {
11273    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11274    pub vtol_state: MavVtolState,
11275    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11276    pub landed_state: MavLandedState,
11277}
11278impl EXTENDED_SYS_STATE_DATA {
11279    pub const ENCODED_LEN: usize = 2usize;
11280    pub const DEFAULT: Self = Self {
11281        vtol_state: MavVtolState::DEFAULT,
11282        landed_state: MavLandedState::DEFAULT,
11283    };
11284    #[cfg(feature = "arbitrary")]
11285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11286        use arbitrary::{Arbitrary, Unstructured};
11287        let mut buf = [0u8; 1024];
11288        rng.fill_bytes(&mut buf);
11289        let mut unstructured = Unstructured::new(&buf);
11290        Self::arbitrary(&mut unstructured).unwrap_or_default()
11291    }
11292}
11293impl Default for EXTENDED_SYS_STATE_DATA {
11294    fn default() -> Self {
11295        Self::DEFAULT.clone()
11296    }
11297}
11298impl MessageData for EXTENDED_SYS_STATE_DATA {
11299    type Message = MavMessage;
11300    const ID: u32 = 245u32;
11301    const NAME: &'static str = "EXTENDED_SYS_STATE";
11302    const EXTRA_CRC: u8 = 130u8;
11303    const ENCODED_LEN: usize = 2usize;
11304    fn deser(
11305        _version: MavlinkVersion,
11306        __input: &[u8],
11307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11308        let avail_len = __input.len();
11309        let mut payload_buf = [0; Self::ENCODED_LEN];
11310        let mut buf = if avail_len < Self::ENCODED_LEN {
11311            payload_buf[0..avail_len].copy_from_slice(__input);
11312            Bytes::new(&payload_buf)
11313        } else {
11314            Bytes::new(__input)
11315        };
11316        let mut __struct = Self::default();
11317        let tmp = buf.get_u8();
11318        __struct.vtol_state =
11319            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11320                enum_type: "MavVtolState",
11321                value: tmp as u32,
11322            })?;
11323        let tmp = buf.get_u8();
11324        __struct.landed_state =
11325            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11326                enum_type: "MavLandedState",
11327                value: tmp as u32,
11328            })?;
11329        Ok(__struct)
11330    }
11331    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11332        let mut __tmp = BytesMut::new(bytes);
11333        #[allow(clippy::absurd_extreme_comparisons)]
11334        #[allow(unused_comparisons)]
11335        if __tmp.remaining() < Self::ENCODED_LEN {
11336            panic!(
11337                "buffer is too small (need {} bytes, but got {})",
11338                Self::ENCODED_LEN,
11339                __tmp.remaining(),
11340            )
11341        }
11342        __tmp.put_u8(self.vtol_state as u8);
11343        __tmp.put_u8(self.landed_state as u8);
11344        if matches!(version, MavlinkVersion::V2) {
11345            let len = __tmp.len();
11346            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11347        } else {
11348            __tmp.len()
11349        }
11350    }
11351}
11352#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11353#[doc = ""]
11354#[doc = "ID: 162"]
11355#[derive(Debug, Clone, PartialEq)]
11356#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11357#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11358pub struct FENCE_STATUS_DATA {
11359    #[doc = "Time (since boot) of last breach."]
11360    pub breach_time: u32,
11361    #[doc = "Number of fence breaches."]
11362    pub breach_count: u16,
11363    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11364    pub breach_status: u8,
11365    #[doc = "Last breach type."]
11366    pub breach_type: FenceBreach,
11367    #[doc = "Active action to prevent fence breach"]
11368    #[cfg_attr(feature = "serde", serde(default))]
11369    pub breach_mitigation: FenceMitigate,
11370}
11371impl FENCE_STATUS_DATA {
11372    pub const ENCODED_LEN: usize = 9usize;
11373    pub const DEFAULT: Self = Self {
11374        breach_time: 0_u32,
11375        breach_count: 0_u16,
11376        breach_status: 0_u8,
11377        breach_type: FenceBreach::DEFAULT,
11378        breach_mitigation: FenceMitigate::DEFAULT,
11379    };
11380    #[cfg(feature = "arbitrary")]
11381    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11382        use arbitrary::{Arbitrary, Unstructured};
11383        let mut buf = [0u8; 1024];
11384        rng.fill_bytes(&mut buf);
11385        let mut unstructured = Unstructured::new(&buf);
11386        Self::arbitrary(&mut unstructured).unwrap_or_default()
11387    }
11388}
11389impl Default for FENCE_STATUS_DATA {
11390    fn default() -> Self {
11391        Self::DEFAULT.clone()
11392    }
11393}
11394impl MessageData for FENCE_STATUS_DATA {
11395    type Message = MavMessage;
11396    const ID: u32 = 162u32;
11397    const NAME: &'static str = "FENCE_STATUS";
11398    const EXTRA_CRC: u8 = 189u8;
11399    const ENCODED_LEN: usize = 9usize;
11400    fn deser(
11401        _version: MavlinkVersion,
11402        __input: &[u8],
11403    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11404        let avail_len = __input.len();
11405        let mut payload_buf = [0; Self::ENCODED_LEN];
11406        let mut buf = if avail_len < Self::ENCODED_LEN {
11407            payload_buf[0..avail_len].copy_from_slice(__input);
11408            Bytes::new(&payload_buf)
11409        } else {
11410            Bytes::new(__input)
11411        };
11412        let mut __struct = Self::default();
11413        __struct.breach_time = buf.get_u32_le();
11414        __struct.breach_count = buf.get_u16_le();
11415        __struct.breach_status = buf.get_u8();
11416        let tmp = buf.get_u8();
11417        __struct.breach_type =
11418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11419                enum_type: "FenceBreach",
11420                value: tmp as u32,
11421            })?;
11422        let tmp = buf.get_u8();
11423        __struct.breach_mitigation =
11424            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11425                enum_type: "FenceMitigate",
11426                value: tmp as u32,
11427            })?;
11428        Ok(__struct)
11429    }
11430    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11431        let mut __tmp = BytesMut::new(bytes);
11432        #[allow(clippy::absurd_extreme_comparisons)]
11433        #[allow(unused_comparisons)]
11434        if __tmp.remaining() < Self::ENCODED_LEN {
11435            panic!(
11436                "buffer is too small (need {} bytes, but got {})",
11437                Self::ENCODED_LEN,
11438                __tmp.remaining(),
11439            )
11440        }
11441        __tmp.put_u32_le(self.breach_time);
11442        __tmp.put_u16_le(self.breach_count);
11443        __tmp.put_u8(self.breach_status);
11444        __tmp.put_u8(self.breach_type as u8);
11445        __tmp.put_u8(self.breach_mitigation as u8);
11446        if matches!(version, MavlinkVersion::V2) {
11447            let len = __tmp.len();
11448            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11449        } else {
11450            __tmp.len()
11451        }
11452    }
11453}
11454#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11455#[doc = ""]
11456#[doc = "ID: 110"]
11457#[derive(Debug, Clone, PartialEq)]
11458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11460pub struct FILE_TRANSFER_PROTOCOL_DATA {
11461    #[doc = "Network ID (0 for broadcast)"]
11462    pub target_network: u8,
11463    #[doc = "System ID (0 for broadcast)"]
11464    pub target_system: u8,
11465    #[doc = "Component ID (0 for broadcast)"]
11466    pub target_component: u8,
11467    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11468    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11469    pub payload: [u8; 251],
11470}
11471impl FILE_TRANSFER_PROTOCOL_DATA {
11472    pub const ENCODED_LEN: usize = 254usize;
11473    pub const DEFAULT: Self = Self {
11474        target_network: 0_u8,
11475        target_system: 0_u8,
11476        target_component: 0_u8,
11477        payload: [0_u8; 251usize],
11478    };
11479    #[cfg(feature = "arbitrary")]
11480    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11481        use arbitrary::{Arbitrary, Unstructured};
11482        let mut buf = [0u8; 1024];
11483        rng.fill_bytes(&mut buf);
11484        let mut unstructured = Unstructured::new(&buf);
11485        Self::arbitrary(&mut unstructured).unwrap_or_default()
11486    }
11487}
11488impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11489    fn default() -> Self {
11490        Self::DEFAULT.clone()
11491    }
11492}
11493impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11494    type Message = MavMessage;
11495    const ID: u32 = 110u32;
11496    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11497    const EXTRA_CRC: u8 = 84u8;
11498    const ENCODED_LEN: usize = 254usize;
11499    fn deser(
11500        _version: MavlinkVersion,
11501        __input: &[u8],
11502    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11503        let avail_len = __input.len();
11504        let mut payload_buf = [0; Self::ENCODED_LEN];
11505        let mut buf = if avail_len < Self::ENCODED_LEN {
11506            payload_buf[0..avail_len].copy_from_slice(__input);
11507            Bytes::new(&payload_buf)
11508        } else {
11509            Bytes::new(__input)
11510        };
11511        let mut __struct = Self::default();
11512        __struct.target_network = buf.get_u8();
11513        __struct.target_system = buf.get_u8();
11514        __struct.target_component = buf.get_u8();
11515        for v in &mut __struct.payload {
11516            let val = buf.get_u8();
11517            *v = val;
11518        }
11519        Ok(__struct)
11520    }
11521    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11522        let mut __tmp = BytesMut::new(bytes);
11523        #[allow(clippy::absurd_extreme_comparisons)]
11524        #[allow(unused_comparisons)]
11525        if __tmp.remaining() < Self::ENCODED_LEN {
11526            panic!(
11527                "buffer is too small (need {} bytes, but got {})",
11528                Self::ENCODED_LEN,
11529                __tmp.remaining(),
11530            )
11531        }
11532        __tmp.put_u8(self.target_network);
11533        __tmp.put_u8(self.target_system);
11534        __tmp.put_u8(self.target_component);
11535        for val in &self.payload {
11536            __tmp.put_u8(*val);
11537        }
11538        if matches!(version, MavlinkVersion::V2) {
11539            let len = __tmp.len();
11540            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11541        } else {
11542            __tmp.len()
11543        }
11544    }
11545}
11546#[doc = "Flexifunction type and parameters for component at function index from buffer."]
11547#[doc = ""]
11548#[doc = "ID: 152"]
11549#[derive(Debug, Clone, PartialEq)]
11550#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11551#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11552pub struct FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11553    #[doc = "Function index"]
11554    pub func_index: u16,
11555    #[doc = "Total count of functions"]
11556    pub func_count: u16,
11557    #[doc = "Address in the flexifunction data, Set to 0xFFFF to use address in target memory"]
11558    pub data_address: u16,
11559    #[doc = "Size of the"]
11560    pub data_size: u16,
11561    #[doc = "System ID"]
11562    pub target_system: u8,
11563    #[doc = "Component ID"]
11564    pub target_component: u8,
11565    #[doc = "Settings data"]
11566    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11567    pub data: [i8; 48],
11568}
11569impl FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11570    pub const ENCODED_LEN: usize = 58usize;
11571    pub const DEFAULT: Self = Self {
11572        func_index: 0_u16,
11573        func_count: 0_u16,
11574        data_address: 0_u16,
11575        data_size: 0_u16,
11576        target_system: 0_u8,
11577        target_component: 0_u8,
11578        data: [0_i8; 48usize],
11579    };
11580    #[cfg(feature = "arbitrary")]
11581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11582        use arbitrary::{Arbitrary, Unstructured};
11583        let mut buf = [0u8; 1024];
11584        rng.fill_bytes(&mut buf);
11585        let mut unstructured = Unstructured::new(&buf);
11586        Self::arbitrary(&mut unstructured).unwrap_or_default()
11587    }
11588}
11589impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11590    fn default() -> Self {
11591        Self::DEFAULT.clone()
11592    }
11593}
11594impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_DATA {
11595    type Message = MavMessage;
11596    const ID: u32 = 152u32;
11597    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION";
11598    const EXTRA_CRC: u8 = 101u8;
11599    const ENCODED_LEN: usize = 58usize;
11600    fn deser(
11601        _version: MavlinkVersion,
11602        __input: &[u8],
11603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11604        let avail_len = __input.len();
11605        let mut payload_buf = [0; Self::ENCODED_LEN];
11606        let mut buf = if avail_len < Self::ENCODED_LEN {
11607            payload_buf[0..avail_len].copy_from_slice(__input);
11608            Bytes::new(&payload_buf)
11609        } else {
11610            Bytes::new(__input)
11611        };
11612        let mut __struct = Self::default();
11613        __struct.func_index = buf.get_u16_le();
11614        __struct.func_count = buf.get_u16_le();
11615        __struct.data_address = buf.get_u16_le();
11616        __struct.data_size = buf.get_u16_le();
11617        __struct.target_system = buf.get_u8();
11618        __struct.target_component = buf.get_u8();
11619        for v in &mut __struct.data {
11620            let val = buf.get_i8();
11621            *v = val;
11622        }
11623        Ok(__struct)
11624    }
11625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11626        let mut __tmp = BytesMut::new(bytes);
11627        #[allow(clippy::absurd_extreme_comparisons)]
11628        #[allow(unused_comparisons)]
11629        if __tmp.remaining() < Self::ENCODED_LEN {
11630            panic!(
11631                "buffer is too small (need {} bytes, but got {})",
11632                Self::ENCODED_LEN,
11633                __tmp.remaining(),
11634            )
11635        }
11636        __tmp.put_u16_le(self.func_index);
11637        __tmp.put_u16_le(self.func_count);
11638        __tmp.put_u16_le(self.data_address);
11639        __tmp.put_u16_le(self.data_size);
11640        __tmp.put_u8(self.target_system);
11641        __tmp.put_u8(self.target_component);
11642        for val in &self.data {
11643            __tmp.put_i8(*val);
11644        }
11645        if matches!(version, MavlinkVersion::V2) {
11646            let len = __tmp.len();
11647            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11648        } else {
11649            __tmp.len()
11650        }
11651    }
11652}
11653#[doc = "Flexifunction type and parameters for component at function index from buffer."]
11654#[doc = ""]
11655#[doc = "ID: 153"]
11656#[derive(Debug, Clone, PartialEq)]
11657#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11658#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11659pub struct FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11660    #[doc = "Function index"]
11661    pub func_index: u16,
11662    #[doc = "result of acknowledge, 0=fail, 1=good"]
11663    pub result: u16,
11664    #[doc = "System ID"]
11665    pub target_system: u8,
11666    #[doc = "Component ID"]
11667    pub target_component: u8,
11668}
11669impl FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11670    pub const ENCODED_LEN: usize = 6usize;
11671    pub const DEFAULT: Self = Self {
11672        func_index: 0_u16,
11673        result: 0_u16,
11674        target_system: 0_u8,
11675        target_component: 0_u8,
11676    };
11677    #[cfg(feature = "arbitrary")]
11678    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11679        use arbitrary::{Arbitrary, Unstructured};
11680        let mut buf = [0u8; 1024];
11681        rng.fill_bytes(&mut buf);
11682        let mut unstructured = Unstructured::new(&buf);
11683        Self::arbitrary(&mut unstructured).unwrap_or_default()
11684    }
11685}
11686impl Default for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11687    fn default() -> Self {
11688        Self::DEFAULT.clone()
11689    }
11690}
11691impl MessageData for FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA {
11692    type Message = MavMessage;
11693    const ID: u32 = 153u32;
11694    const NAME: &'static str = "FLEXIFUNCTION_BUFFER_FUNCTION_ACK";
11695    const EXTRA_CRC: u8 = 109u8;
11696    const ENCODED_LEN: usize = 6usize;
11697    fn deser(
11698        _version: MavlinkVersion,
11699        __input: &[u8],
11700    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11701        let avail_len = __input.len();
11702        let mut payload_buf = [0; Self::ENCODED_LEN];
11703        let mut buf = if avail_len < Self::ENCODED_LEN {
11704            payload_buf[0..avail_len].copy_from_slice(__input);
11705            Bytes::new(&payload_buf)
11706        } else {
11707            Bytes::new(__input)
11708        };
11709        let mut __struct = Self::default();
11710        __struct.func_index = buf.get_u16_le();
11711        __struct.result = buf.get_u16_le();
11712        __struct.target_system = buf.get_u8();
11713        __struct.target_component = buf.get_u8();
11714        Ok(__struct)
11715    }
11716    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11717        let mut __tmp = BytesMut::new(bytes);
11718        #[allow(clippy::absurd_extreme_comparisons)]
11719        #[allow(unused_comparisons)]
11720        if __tmp.remaining() < Self::ENCODED_LEN {
11721            panic!(
11722                "buffer is too small (need {} bytes, but got {})",
11723                Self::ENCODED_LEN,
11724                __tmp.remaining(),
11725            )
11726        }
11727        __tmp.put_u16_le(self.func_index);
11728        __tmp.put_u16_le(self.result);
11729        __tmp.put_u8(self.target_system);
11730        __tmp.put_u8(self.target_component);
11731        if matches!(version, MavlinkVersion::V2) {
11732            let len = __tmp.len();
11733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11734        } else {
11735            __tmp.len()
11736        }
11737    }
11738}
11739#[doc = "Acknowldge success or failure of a flexifunction command."]
11740#[doc = ""]
11741#[doc = "ID: 157"]
11742#[derive(Debug, Clone, PartialEq)]
11743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11745pub struct FLEXIFUNCTION_COMMAND_DATA {
11746    #[doc = "System ID"]
11747    pub target_system: u8,
11748    #[doc = "Component ID"]
11749    pub target_component: u8,
11750    #[doc = "Flexifunction command type"]
11751    pub command_type: u8,
11752}
11753impl FLEXIFUNCTION_COMMAND_DATA {
11754    pub const ENCODED_LEN: usize = 3usize;
11755    pub const DEFAULT: Self = Self {
11756        target_system: 0_u8,
11757        target_component: 0_u8,
11758        command_type: 0_u8,
11759    };
11760    #[cfg(feature = "arbitrary")]
11761    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11762        use arbitrary::{Arbitrary, Unstructured};
11763        let mut buf = [0u8; 1024];
11764        rng.fill_bytes(&mut buf);
11765        let mut unstructured = Unstructured::new(&buf);
11766        Self::arbitrary(&mut unstructured).unwrap_or_default()
11767    }
11768}
11769impl Default for FLEXIFUNCTION_COMMAND_DATA {
11770    fn default() -> Self {
11771        Self::DEFAULT.clone()
11772    }
11773}
11774impl MessageData for FLEXIFUNCTION_COMMAND_DATA {
11775    type Message = MavMessage;
11776    const ID: u32 = 157u32;
11777    const NAME: &'static str = "FLEXIFUNCTION_COMMAND";
11778    const EXTRA_CRC: u8 = 133u8;
11779    const ENCODED_LEN: usize = 3usize;
11780    fn deser(
11781        _version: MavlinkVersion,
11782        __input: &[u8],
11783    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11784        let avail_len = __input.len();
11785        let mut payload_buf = [0; Self::ENCODED_LEN];
11786        let mut buf = if avail_len < Self::ENCODED_LEN {
11787            payload_buf[0..avail_len].copy_from_slice(__input);
11788            Bytes::new(&payload_buf)
11789        } else {
11790            Bytes::new(__input)
11791        };
11792        let mut __struct = Self::default();
11793        __struct.target_system = buf.get_u8();
11794        __struct.target_component = buf.get_u8();
11795        __struct.command_type = buf.get_u8();
11796        Ok(__struct)
11797    }
11798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11799        let mut __tmp = BytesMut::new(bytes);
11800        #[allow(clippy::absurd_extreme_comparisons)]
11801        #[allow(unused_comparisons)]
11802        if __tmp.remaining() < Self::ENCODED_LEN {
11803            panic!(
11804                "buffer is too small (need {} bytes, but got {})",
11805                Self::ENCODED_LEN,
11806                __tmp.remaining(),
11807            )
11808        }
11809        __tmp.put_u8(self.target_system);
11810        __tmp.put_u8(self.target_component);
11811        __tmp.put_u8(self.command_type);
11812        if matches!(version, MavlinkVersion::V2) {
11813            let len = __tmp.len();
11814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11815        } else {
11816            __tmp.len()
11817        }
11818    }
11819}
11820#[doc = "Acknowldge success or failure of a flexifunction command."]
11821#[doc = ""]
11822#[doc = "ID: 158"]
11823#[derive(Debug, Clone, PartialEq)]
11824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11826pub struct FLEXIFUNCTION_COMMAND_ACK_DATA {
11827    #[doc = "Command acknowledged"]
11828    pub command_type: u16,
11829    #[doc = "result of acknowledge"]
11830    pub result: u16,
11831}
11832impl FLEXIFUNCTION_COMMAND_ACK_DATA {
11833    pub const ENCODED_LEN: usize = 4usize;
11834    pub const DEFAULT: Self = Self {
11835        command_type: 0_u16,
11836        result: 0_u16,
11837    };
11838    #[cfg(feature = "arbitrary")]
11839    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11840        use arbitrary::{Arbitrary, Unstructured};
11841        let mut buf = [0u8; 1024];
11842        rng.fill_bytes(&mut buf);
11843        let mut unstructured = Unstructured::new(&buf);
11844        Self::arbitrary(&mut unstructured).unwrap_or_default()
11845    }
11846}
11847impl Default for FLEXIFUNCTION_COMMAND_ACK_DATA {
11848    fn default() -> Self {
11849        Self::DEFAULT.clone()
11850    }
11851}
11852impl MessageData for FLEXIFUNCTION_COMMAND_ACK_DATA {
11853    type Message = MavMessage;
11854    const ID: u32 = 158u32;
11855    const NAME: &'static str = "FLEXIFUNCTION_COMMAND_ACK";
11856    const EXTRA_CRC: u8 = 208u8;
11857    const ENCODED_LEN: usize = 4usize;
11858    fn deser(
11859        _version: MavlinkVersion,
11860        __input: &[u8],
11861    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11862        let avail_len = __input.len();
11863        let mut payload_buf = [0; Self::ENCODED_LEN];
11864        let mut buf = if avail_len < Self::ENCODED_LEN {
11865            payload_buf[0..avail_len].copy_from_slice(__input);
11866            Bytes::new(&payload_buf)
11867        } else {
11868            Bytes::new(__input)
11869        };
11870        let mut __struct = Self::default();
11871        __struct.command_type = buf.get_u16_le();
11872        __struct.result = buf.get_u16_le();
11873        Ok(__struct)
11874    }
11875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11876        let mut __tmp = BytesMut::new(bytes);
11877        #[allow(clippy::absurd_extreme_comparisons)]
11878        #[allow(unused_comparisons)]
11879        if __tmp.remaining() < Self::ENCODED_LEN {
11880            panic!(
11881                "buffer is too small (need {} bytes, but got {})",
11882                Self::ENCODED_LEN,
11883                __tmp.remaining(),
11884            )
11885        }
11886        __tmp.put_u16_le(self.command_type);
11887        __tmp.put_u16_le(self.result);
11888        if matches!(version, MavlinkVersion::V2) {
11889            let len = __tmp.len();
11890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11891        } else {
11892            __tmp.len()
11893        }
11894    }
11895}
11896#[doc = "Acknowldge success or failure of a flexifunction command."]
11897#[doc = ""]
11898#[doc = "ID: 155"]
11899#[derive(Debug, Clone, PartialEq)]
11900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11902pub struct FLEXIFUNCTION_DIRECTORY_DATA {
11903    #[doc = "System ID"]
11904    pub target_system: u8,
11905    #[doc = "Component ID"]
11906    pub target_component: u8,
11907    #[doc = "0=inputs, 1=outputs"]
11908    pub directory_type: u8,
11909    #[doc = "index of first directory entry to write"]
11910    pub start_index: u8,
11911    #[doc = "count of directory entries to write"]
11912    pub count: u8,
11913    #[doc = "Settings data"]
11914    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11915    pub directory_data: [i8; 48],
11916}
11917impl FLEXIFUNCTION_DIRECTORY_DATA {
11918    pub const ENCODED_LEN: usize = 53usize;
11919    pub const DEFAULT: Self = Self {
11920        target_system: 0_u8,
11921        target_component: 0_u8,
11922        directory_type: 0_u8,
11923        start_index: 0_u8,
11924        count: 0_u8,
11925        directory_data: [0_i8; 48usize],
11926    };
11927    #[cfg(feature = "arbitrary")]
11928    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11929        use arbitrary::{Arbitrary, Unstructured};
11930        let mut buf = [0u8; 1024];
11931        rng.fill_bytes(&mut buf);
11932        let mut unstructured = Unstructured::new(&buf);
11933        Self::arbitrary(&mut unstructured).unwrap_or_default()
11934    }
11935}
11936impl Default for FLEXIFUNCTION_DIRECTORY_DATA {
11937    fn default() -> Self {
11938        Self::DEFAULT.clone()
11939    }
11940}
11941impl MessageData for FLEXIFUNCTION_DIRECTORY_DATA {
11942    type Message = MavMessage;
11943    const ID: u32 = 155u32;
11944    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY";
11945    const EXTRA_CRC: u8 = 12u8;
11946    const ENCODED_LEN: usize = 53usize;
11947    fn deser(
11948        _version: MavlinkVersion,
11949        __input: &[u8],
11950    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11951        let avail_len = __input.len();
11952        let mut payload_buf = [0; Self::ENCODED_LEN];
11953        let mut buf = if avail_len < Self::ENCODED_LEN {
11954            payload_buf[0..avail_len].copy_from_slice(__input);
11955            Bytes::new(&payload_buf)
11956        } else {
11957            Bytes::new(__input)
11958        };
11959        let mut __struct = Self::default();
11960        __struct.target_system = buf.get_u8();
11961        __struct.target_component = buf.get_u8();
11962        __struct.directory_type = buf.get_u8();
11963        __struct.start_index = buf.get_u8();
11964        __struct.count = buf.get_u8();
11965        for v in &mut __struct.directory_data {
11966            let val = buf.get_i8();
11967            *v = val;
11968        }
11969        Ok(__struct)
11970    }
11971    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11972        let mut __tmp = BytesMut::new(bytes);
11973        #[allow(clippy::absurd_extreme_comparisons)]
11974        #[allow(unused_comparisons)]
11975        if __tmp.remaining() < Self::ENCODED_LEN {
11976            panic!(
11977                "buffer is too small (need {} bytes, but got {})",
11978                Self::ENCODED_LEN,
11979                __tmp.remaining(),
11980            )
11981        }
11982        __tmp.put_u8(self.target_system);
11983        __tmp.put_u8(self.target_component);
11984        __tmp.put_u8(self.directory_type);
11985        __tmp.put_u8(self.start_index);
11986        __tmp.put_u8(self.count);
11987        for val in &self.directory_data {
11988            __tmp.put_i8(*val);
11989        }
11990        if matches!(version, MavlinkVersion::V2) {
11991            let len = __tmp.len();
11992            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11993        } else {
11994            __tmp.len()
11995        }
11996    }
11997}
11998#[doc = "Acknowldge success or failure of a flexifunction command."]
11999#[doc = ""]
12000#[doc = "ID: 156"]
12001#[derive(Debug, Clone, PartialEq)]
12002#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12003#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12004pub struct FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12005    #[doc = "result of acknowledge, 0=fail, 1=good"]
12006    pub result: u16,
12007    #[doc = "System ID"]
12008    pub target_system: u8,
12009    #[doc = "Component ID"]
12010    pub target_component: u8,
12011    #[doc = "0=inputs, 1=outputs"]
12012    pub directory_type: u8,
12013    #[doc = "index of first directory entry to write"]
12014    pub start_index: u8,
12015    #[doc = "count of directory entries to write"]
12016    pub count: u8,
12017}
12018impl FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12019    pub const ENCODED_LEN: usize = 7usize;
12020    pub const DEFAULT: Self = Self {
12021        result: 0_u16,
12022        target_system: 0_u8,
12023        target_component: 0_u8,
12024        directory_type: 0_u8,
12025        start_index: 0_u8,
12026        count: 0_u8,
12027    };
12028    #[cfg(feature = "arbitrary")]
12029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12030        use arbitrary::{Arbitrary, Unstructured};
12031        let mut buf = [0u8; 1024];
12032        rng.fill_bytes(&mut buf);
12033        let mut unstructured = Unstructured::new(&buf);
12034        Self::arbitrary(&mut unstructured).unwrap_or_default()
12035    }
12036}
12037impl Default for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12038    fn default() -> Self {
12039        Self::DEFAULT.clone()
12040    }
12041}
12042impl MessageData for FLEXIFUNCTION_DIRECTORY_ACK_DATA {
12043    type Message = MavMessage;
12044    const ID: u32 = 156u32;
12045    const NAME: &'static str = "FLEXIFUNCTION_DIRECTORY_ACK";
12046    const EXTRA_CRC: u8 = 218u8;
12047    const ENCODED_LEN: usize = 7usize;
12048    fn deser(
12049        _version: MavlinkVersion,
12050        __input: &[u8],
12051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12052        let avail_len = __input.len();
12053        let mut payload_buf = [0; Self::ENCODED_LEN];
12054        let mut buf = if avail_len < Self::ENCODED_LEN {
12055            payload_buf[0..avail_len].copy_from_slice(__input);
12056            Bytes::new(&payload_buf)
12057        } else {
12058            Bytes::new(__input)
12059        };
12060        let mut __struct = Self::default();
12061        __struct.result = buf.get_u16_le();
12062        __struct.target_system = buf.get_u8();
12063        __struct.target_component = buf.get_u8();
12064        __struct.directory_type = buf.get_u8();
12065        __struct.start_index = buf.get_u8();
12066        __struct.count = buf.get_u8();
12067        Ok(__struct)
12068    }
12069    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12070        let mut __tmp = BytesMut::new(bytes);
12071        #[allow(clippy::absurd_extreme_comparisons)]
12072        #[allow(unused_comparisons)]
12073        if __tmp.remaining() < Self::ENCODED_LEN {
12074            panic!(
12075                "buffer is too small (need {} bytes, but got {})",
12076                Self::ENCODED_LEN,
12077                __tmp.remaining(),
12078            )
12079        }
12080        __tmp.put_u16_le(self.result);
12081        __tmp.put_u8(self.target_system);
12082        __tmp.put_u8(self.target_component);
12083        __tmp.put_u8(self.directory_type);
12084        __tmp.put_u8(self.start_index);
12085        __tmp.put_u8(self.count);
12086        if matches!(version, MavlinkVersion::V2) {
12087            let len = __tmp.len();
12088            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12089        } else {
12090            __tmp.len()
12091        }
12092    }
12093}
12094#[doc = "Request reading of flexifunction data."]
12095#[doc = ""]
12096#[doc = "ID: 151"]
12097#[derive(Debug, Clone, PartialEq)]
12098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12100pub struct FLEXIFUNCTION_READ_REQ_DATA {
12101    #[doc = "Type of flexifunction data requested"]
12102    pub read_req_type: i16,
12103    #[doc = "index into data where needed"]
12104    pub data_index: i16,
12105    #[doc = "System ID"]
12106    pub target_system: u8,
12107    #[doc = "Component ID"]
12108    pub target_component: u8,
12109}
12110impl FLEXIFUNCTION_READ_REQ_DATA {
12111    pub const ENCODED_LEN: usize = 6usize;
12112    pub const DEFAULT: Self = Self {
12113        read_req_type: 0_i16,
12114        data_index: 0_i16,
12115        target_system: 0_u8,
12116        target_component: 0_u8,
12117    };
12118    #[cfg(feature = "arbitrary")]
12119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12120        use arbitrary::{Arbitrary, Unstructured};
12121        let mut buf = [0u8; 1024];
12122        rng.fill_bytes(&mut buf);
12123        let mut unstructured = Unstructured::new(&buf);
12124        Self::arbitrary(&mut unstructured).unwrap_or_default()
12125    }
12126}
12127impl Default for FLEXIFUNCTION_READ_REQ_DATA {
12128    fn default() -> Self {
12129        Self::DEFAULT.clone()
12130    }
12131}
12132impl MessageData for FLEXIFUNCTION_READ_REQ_DATA {
12133    type Message = MavMessage;
12134    const ID: u32 = 151u32;
12135    const NAME: &'static str = "FLEXIFUNCTION_READ_REQ";
12136    const EXTRA_CRC: u8 = 26u8;
12137    const ENCODED_LEN: usize = 6usize;
12138    fn deser(
12139        _version: MavlinkVersion,
12140        __input: &[u8],
12141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12142        let avail_len = __input.len();
12143        let mut payload_buf = [0; Self::ENCODED_LEN];
12144        let mut buf = if avail_len < Self::ENCODED_LEN {
12145            payload_buf[0..avail_len].copy_from_slice(__input);
12146            Bytes::new(&payload_buf)
12147        } else {
12148            Bytes::new(__input)
12149        };
12150        let mut __struct = Self::default();
12151        __struct.read_req_type = buf.get_i16_le();
12152        __struct.data_index = buf.get_i16_le();
12153        __struct.target_system = buf.get_u8();
12154        __struct.target_component = buf.get_u8();
12155        Ok(__struct)
12156    }
12157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12158        let mut __tmp = BytesMut::new(bytes);
12159        #[allow(clippy::absurd_extreme_comparisons)]
12160        #[allow(unused_comparisons)]
12161        if __tmp.remaining() < Self::ENCODED_LEN {
12162            panic!(
12163                "buffer is too small (need {} bytes, but got {})",
12164                Self::ENCODED_LEN,
12165                __tmp.remaining(),
12166            )
12167        }
12168        __tmp.put_i16_le(self.read_req_type);
12169        __tmp.put_i16_le(self.data_index);
12170        __tmp.put_u8(self.target_system);
12171        __tmp.put_u8(self.target_component);
12172        if matches!(version, MavlinkVersion::V2) {
12173            let len = __tmp.len();
12174            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12175        } else {
12176            __tmp.len()
12177        }
12178    }
12179}
12180#[doc = "Depreciated but used as a compiler flag.  Do not remove."]
12181#[doc = ""]
12182#[doc = "ID: 150"]
12183#[derive(Debug, Clone, PartialEq)]
12184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12186pub struct FLEXIFUNCTION_SET_DATA {
12187    #[doc = "System ID"]
12188    pub target_system: u8,
12189    #[doc = "Component ID"]
12190    pub target_component: u8,
12191}
12192impl FLEXIFUNCTION_SET_DATA {
12193    pub const ENCODED_LEN: usize = 2usize;
12194    pub const DEFAULT: Self = Self {
12195        target_system: 0_u8,
12196        target_component: 0_u8,
12197    };
12198    #[cfg(feature = "arbitrary")]
12199    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12200        use arbitrary::{Arbitrary, Unstructured};
12201        let mut buf = [0u8; 1024];
12202        rng.fill_bytes(&mut buf);
12203        let mut unstructured = Unstructured::new(&buf);
12204        Self::arbitrary(&mut unstructured).unwrap_or_default()
12205    }
12206}
12207impl Default for FLEXIFUNCTION_SET_DATA {
12208    fn default() -> Self {
12209        Self::DEFAULT.clone()
12210    }
12211}
12212impl MessageData for FLEXIFUNCTION_SET_DATA {
12213    type Message = MavMessage;
12214    const ID: u32 = 150u32;
12215    const NAME: &'static str = "FLEXIFUNCTION_SET";
12216    const EXTRA_CRC: u8 = 181u8;
12217    const ENCODED_LEN: usize = 2usize;
12218    fn deser(
12219        _version: MavlinkVersion,
12220        __input: &[u8],
12221    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12222        let avail_len = __input.len();
12223        let mut payload_buf = [0; Self::ENCODED_LEN];
12224        let mut buf = if avail_len < Self::ENCODED_LEN {
12225            payload_buf[0..avail_len].copy_from_slice(__input);
12226            Bytes::new(&payload_buf)
12227        } else {
12228            Bytes::new(__input)
12229        };
12230        let mut __struct = Self::default();
12231        __struct.target_system = buf.get_u8();
12232        __struct.target_component = buf.get_u8();
12233        Ok(__struct)
12234    }
12235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12236        let mut __tmp = BytesMut::new(bytes);
12237        #[allow(clippy::absurd_extreme_comparisons)]
12238        #[allow(unused_comparisons)]
12239        if __tmp.remaining() < Self::ENCODED_LEN {
12240            panic!(
12241                "buffer is too small (need {} bytes, but got {})",
12242                Self::ENCODED_LEN,
12243                __tmp.remaining(),
12244            )
12245        }
12246        __tmp.put_u8(self.target_system);
12247        __tmp.put_u8(self.target_component);
12248        if matches!(version, MavlinkVersion::V2) {
12249            let len = __tmp.len();
12250            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12251        } else {
12252            __tmp.len()
12253        }
12254    }
12255}
12256#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
12257#[doc = ""]
12258#[doc = "ID: 264"]
12259#[derive(Debug, Clone, PartialEq)]
12260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12262pub struct FLIGHT_INFORMATION_DATA {
12263    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
12264    pub arming_time_utc: u64,
12265    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
12266    pub takeoff_time_utc: u64,
12267    #[doc = "Flight number. Note, field is misnamed UUID."]
12268    pub flight_uuid: u64,
12269    #[doc = "Timestamp (time since system boot)."]
12270    pub time_boot_ms: u32,
12271    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
12272    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12273    pub landing_time: u32,
12274}
12275impl FLIGHT_INFORMATION_DATA {
12276    pub const ENCODED_LEN: usize = 32usize;
12277    pub const DEFAULT: Self = Self {
12278        arming_time_utc: 0_u64,
12279        takeoff_time_utc: 0_u64,
12280        flight_uuid: 0_u64,
12281        time_boot_ms: 0_u32,
12282        landing_time: 0_u32,
12283    };
12284    #[cfg(feature = "arbitrary")]
12285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12286        use arbitrary::{Arbitrary, Unstructured};
12287        let mut buf = [0u8; 1024];
12288        rng.fill_bytes(&mut buf);
12289        let mut unstructured = Unstructured::new(&buf);
12290        Self::arbitrary(&mut unstructured).unwrap_or_default()
12291    }
12292}
12293impl Default for FLIGHT_INFORMATION_DATA {
12294    fn default() -> Self {
12295        Self::DEFAULT.clone()
12296    }
12297}
12298impl MessageData for FLIGHT_INFORMATION_DATA {
12299    type Message = MavMessage;
12300    const ID: u32 = 264u32;
12301    const NAME: &'static str = "FLIGHT_INFORMATION";
12302    const EXTRA_CRC: u8 = 49u8;
12303    const ENCODED_LEN: usize = 32usize;
12304    fn deser(
12305        _version: MavlinkVersion,
12306        __input: &[u8],
12307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12308        let avail_len = __input.len();
12309        let mut payload_buf = [0; Self::ENCODED_LEN];
12310        let mut buf = if avail_len < Self::ENCODED_LEN {
12311            payload_buf[0..avail_len].copy_from_slice(__input);
12312            Bytes::new(&payload_buf)
12313        } else {
12314            Bytes::new(__input)
12315        };
12316        let mut __struct = Self::default();
12317        __struct.arming_time_utc = buf.get_u64_le();
12318        __struct.takeoff_time_utc = buf.get_u64_le();
12319        __struct.flight_uuid = buf.get_u64_le();
12320        __struct.time_boot_ms = buf.get_u32_le();
12321        __struct.landing_time = buf.get_u32_le();
12322        Ok(__struct)
12323    }
12324    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12325        let mut __tmp = BytesMut::new(bytes);
12326        #[allow(clippy::absurd_extreme_comparisons)]
12327        #[allow(unused_comparisons)]
12328        if __tmp.remaining() < Self::ENCODED_LEN {
12329            panic!(
12330                "buffer is too small (need {} bytes, but got {})",
12331                Self::ENCODED_LEN,
12332                __tmp.remaining(),
12333            )
12334        }
12335        __tmp.put_u64_le(self.arming_time_utc);
12336        __tmp.put_u64_le(self.takeoff_time_utc);
12337        __tmp.put_u64_le(self.flight_uuid);
12338        __tmp.put_u32_le(self.time_boot_ms);
12339        __tmp.put_u32_le(self.landing_time);
12340        if matches!(version, MavlinkVersion::V2) {
12341            let len = __tmp.len();
12342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12343        } else {
12344            __tmp.len()
12345        }
12346    }
12347}
12348#[doc = "Current motion information from a designated system."]
12349#[doc = ""]
12350#[doc = "ID: 144"]
12351#[derive(Debug, Clone, PartialEq)]
12352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12354pub struct FOLLOW_TARGET_DATA {
12355    #[doc = "Timestamp (time since system boot)."]
12356    pub timestamp: u64,
12357    #[doc = "button states or switches of a tracker device"]
12358    pub custom_state: u64,
12359    #[doc = "Latitude (WGS84)"]
12360    pub lat: i32,
12361    #[doc = "Longitude (WGS84)"]
12362    pub lon: i32,
12363    #[doc = "Altitude (MSL)"]
12364    pub alt: f32,
12365    #[doc = "target velocity (0,0,0) for unknown"]
12366    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12367    pub vel: [f32; 3],
12368    #[doc = "linear target acceleration (0,0,0) for unknown"]
12369    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12370    pub acc: [f32; 3],
12371    #[doc = "(0 0 0 0 for unknown)"]
12372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12373    pub attitude_q: [f32; 4],
12374    #[doc = "(0 0 0 for unknown)"]
12375    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12376    pub rates: [f32; 3],
12377    #[doc = "eph epv"]
12378    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12379    pub position_cov: [f32; 3],
12380    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
12381    pub est_capabilities: u8,
12382}
12383impl FOLLOW_TARGET_DATA {
12384    pub const ENCODED_LEN: usize = 93usize;
12385    pub const DEFAULT: Self = Self {
12386        timestamp: 0_u64,
12387        custom_state: 0_u64,
12388        lat: 0_i32,
12389        lon: 0_i32,
12390        alt: 0.0_f32,
12391        vel: [0.0_f32; 3usize],
12392        acc: [0.0_f32; 3usize],
12393        attitude_q: [0.0_f32; 4usize],
12394        rates: [0.0_f32; 3usize],
12395        position_cov: [0.0_f32; 3usize],
12396        est_capabilities: 0_u8,
12397    };
12398    #[cfg(feature = "arbitrary")]
12399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12400        use arbitrary::{Arbitrary, Unstructured};
12401        let mut buf = [0u8; 1024];
12402        rng.fill_bytes(&mut buf);
12403        let mut unstructured = Unstructured::new(&buf);
12404        Self::arbitrary(&mut unstructured).unwrap_or_default()
12405    }
12406}
12407impl Default for FOLLOW_TARGET_DATA {
12408    fn default() -> Self {
12409        Self::DEFAULT.clone()
12410    }
12411}
12412impl MessageData for FOLLOW_TARGET_DATA {
12413    type Message = MavMessage;
12414    const ID: u32 = 144u32;
12415    const NAME: &'static str = "FOLLOW_TARGET";
12416    const EXTRA_CRC: u8 = 127u8;
12417    const ENCODED_LEN: usize = 93usize;
12418    fn deser(
12419        _version: MavlinkVersion,
12420        __input: &[u8],
12421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12422        let avail_len = __input.len();
12423        let mut payload_buf = [0; Self::ENCODED_LEN];
12424        let mut buf = if avail_len < Self::ENCODED_LEN {
12425            payload_buf[0..avail_len].copy_from_slice(__input);
12426            Bytes::new(&payload_buf)
12427        } else {
12428            Bytes::new(__input)
12429        };
12430        let mut __struct = Self::default();
12431        __struct.timestamp = buf.get_u64_le();
12432        __struct.custom_state = buf.get_u64_le();
12433        __struct.lat = buf.get_i32_le();
12434        __struct.lon = buf.get_i32_le();
12435        __struct.alt = buf.get_f32_le();
12436        for v in &mut __struct.vel {
12437            let val = buf.get_f32_le();
12438            *v = val;
12439        }
12440        for v in &mut __struct.acc {
12441            let val = buf.get_f32_le();
12442            *v = val;
12443        }
12444        for v in &mut __struct.attitude_q {
12445            let val = buf.get_f32_le();
12446            *v = val;
12447        }
12448        for v in &mut __struct.rates {
12449            let val = buf.get_f32_le();
12450            *v = val;
12451        }
12452        for v in &mut __struct.position_cov {
12453            let val = buf.get_f32_le();
12454            *v = val;
12455        }
12456        __struct.est_capabilities = buf.get_u8();
12457        Ok(__struct)
12458    }
12459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12460        let mut __tmp = BytesMut::new(bytes);
12461        #[allow(clippy::absurd_extreme_comparisons)]
12462        #[allow(unused_comparisons)]
12463        if __tmp.remaining() < Self::ENCODED_LEN {
12464            panic!(
12465                "buffer is too small (need {} bytes, but got {})",
12466                Self::ENCODED_LEN,
12467                __tmp.remaining(),
12468            )
12469        }
12470        __tmp.put_u64_le(self.timestamp);
12471        __tmp.put_u64_le(self.custom_state);
12472        __tmp.put_i32_le(self.lat);
12473        __tmp.put_i32_le(self.lon);
12474        __tmp.put_f32_le(self.alt);
12475        for val in &self.vel {
12476            __tmp.put_f32_le(*val);
12477        }
12478        for val in &self.acc {
12479            __tmp.put_f32_le(*val);
12480        }
12481        for val in &self.attitude_q {
12482            __tmp.put_f32_le(*val);
12483        }
12484        for val in &self.rates {
12485            __tmp.put_f32_le(*val);
12486        }
12487        for val in &self.position_cov {
12488            __tmp.put_f32_le(*val);
12489        }
12490        __tmp.put_u8(self.est_capabilities);
12491        if matches!(version, MavlinkVersion::V2) {
12492            let len = __tmp.len();
12493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12494        } else {
12495            __tmp.len()
12496        }
12497    }
12498}
12499#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
12500#[doc = ""]
12501#[doc = "ID: 371"]
12502#[derive(Debug, Clone, PartialEq)]
12503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12505pub struct FUEL_STATUS_DATA {
12506    #[doc = "Capacity when full. Must be provided."]
12507    pub maximum_fuel: f32,
12508    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12509    pub consumed_fuel: f32,
12510    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
12511    pub remaining_fuel: f32,
12512    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
12513    pub flow_rate: f32,
12514    #[doc = "Fuel temperature. NaN: field not provided."]
12515    pub temperature: f32,
12516    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
12517    pub fuel_type: MavFuelType,
12518    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
12519    pub id: u8,
12520    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
12521    pub percent_remaining: u8,
12522}
12523impl FUEL_STATUS_DATA {
12524    pub const ENCODED_LEN: usize = 26usize;
12525    pub const DEFAULT: Self = Self {
12526        maximum_fuel: 0.0_f32,
12527        consumed_fuel: 0.0_f32,
12528        remaining_fuel: 0.0_f32,
12529        flow_rate: 0.0_f32,
12530        temperature: 0.0_f32,
12531        fuel_type: MavFuelType::DEFAULT,
12532        id: 0_u8,
12533        percent_remaining: 0_u8,
12534    };
12535    #[cfg(feature = "arbitrary")]
12536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12537        use arbitrary::{Arbitrary, Unstructured};
12538        let mut buf = [0u8; 1024];
12539        rng.fill_bytes(&mut buf);
12540        let mut unstructured = Unstructured::new(&buf);
12541        Self::arbitrary(&mut unstructured).unwrap_or_default()
12542    }
12543}
12544impl Default for FUEL_STATUS_DATA {
12545    fn default() -> Self {
12546        Self::DEFAULT.clone()
12547    }
12548}
12549impl MessageData for FUEL_STATUS_DATA {
12550    type Message = MavMessage;
12551    const ID: u32 = 371u32;
12552    const NAME: &'static str = "FUEL_STATUS";
12553    const EXTRA_CRC: u8 = 10u8;
12554    const ENCODED_LEN: usize = 26usize;
12555    fn deser(
12556        _version: MavlinkVersion,
12557        __input: &[u8],
12558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12559        let avail_len = __input.len();
12560        let mut payload_buf = [0; Self::ENCODED_LEN];
12561        let mut buf = if avail_len < Self::ENCODED_LEN {
12562            payload_buf[0..avail_len].copy_from_slice(__input);
12563            Bytes::new(&payload_buf)
12564        } else {
12565            Bytes::new(__input)
12566        };
12567        let mut __struct = Self::default();
12568        __struct.maximum_fuel = buf.get_f32_le();
12569        __struct.consumed_fuel = buf.get_f32_le();
12570        __struct.remaining_fuel = buf.get_f32_le();
12571        __struct.flow_rate = buf.get_f32_le();
12572        __struct.temperature = buf.get_f32_le();
12573        let tmp = buf.get_u32_le();
12574        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
12575            ::mavlink_core::error::ParserError::InvalidEnum {
12576                enum_type: "MavFuelType",
12577                value: tmp as u32,
12578            },
12579        )?;
12580        __struct.id = buf.get_u8();
12581        __struct.percent_remaining = buf.get_u8();
12582        Ok(__struct)
12583    }
12584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12585        let mut __tmp = BytesMut::new(bytes);
12586        #[allow(clippy::absurd_extreme_comparisons)]
12587        #[allow(unused_comparisons)]
12588        if __tmp.remaining() < Self::ENCODED_LEN {
12589            panic!(
12590                "buffer is too small (need {} bytes, but got {})",
12591                Self::ENCODED_LEN,
12592                __tmp.remaining(),
12593            )
12594        }
12595        __tmp.put_f32_le(self.maximum_fuel);
12596        __tmp.put_f32_le(self.consumed_fuel);
12597        __tmp.put_f32_le(self.remaining_fuel);
12598        __tmp.put_f32_le(self.flow_rate);
12599        __tmp.put_f32_le(self.temperature);
12600        __tmp.put_u32_le(self.fuel_type as u32);
12601        __tmp.put_u8(self.id);
12602        __tmp.put_u8(self.percent_remaining);
12603        if matches!(version, MavlinkVersion::V2) {
12604            let len = __tmp.len();
12605            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12606        } else {
12607            __tmp.len()
12608        }
12609    }
12610}
12611#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
12612#[doc = ""]
12613#[doc = "ID: 373"]
12614#[derive(Debug, Clone, PartialEq)]
12615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12617pub struct GENERATOR_STATUS_DATA {
12618    #[doc = "Status flags."]
12619    pub status: MavGeneratorStatusFlag,
12620    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
12621    pub battery_current: f32,
12622    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
12623    pub load_current: f32,
12624    #[doc = "The power being generated. NaN: field not provided"]
12625    pub power_generated: f32,
12626    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
12627    pub bus_voltage: f32,
12628    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
12629    pub bat_current_setpoint: f32,
12630    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
12631    pub runtime: u32,
12632    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
12633    pub time_until_maintenance: i32,
12634    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
12635    pub generator_speed: u16,
12636    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
12637    pub rectifier_temperature: i16,
12638    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
12639    pub generator_temperature: i16,
12640}
12641impl GENERATOR_STATUS_DATA {
12642    pub const ENCODED_LEN: usize = 42usize;
12643    pub const DEFAULT: Self = Self {
12644        status: MavGeneratorStatusFlag::DEFAULT,
12645        battery_current: 0.0_f32,
12646        load_current: 0.0_f32,
12647        power_generated: 0.0_f32,
12648        bus_voltage: 0.0_f32,
12649        bat_current_setpoint: 0.0_f32,
12650        runtime: 0_u32,
12651        time_until_maintenance: 0_i32,
12652        generator_speed: 0_u16,
12653        rectifier_temperature: 0_i16,
12654        generator_temperature: 0_i16,
12655    };
12656    #[cfg(feature = "arbitrary")]
12657    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12658        use arbitrary::{Arbitrary, Unstructured};
12659        let mut buf = [0u8; 1024];
12660        rng.fill_bytes(&mut buf);
12661        let mut unstructured = Unstructured::new(&buf);
12662        Self::arbitrary(&mut unstructured).unwrap_or_default()
12663    }
12664}
12665impl Default for GENERATOR_STATUS_DATA {
12666    fn default() -> Self {
12667        Self::DEFAULT.clone()
12668    }
12669}
12670impl MessageData for GENERATOR_STATUS_DATA {
12671    type Message = MavMessage;
12672    const ID: u32 = 373u32;
12673    const NAME: &'static str = "GENERATOR_STATUS";
12674    const EXTRA_CRC: u8 = 117u8;
12675    const ENCODED_LEN: usize = 42usize;
12676    fn deser(
12677        _version: MavlinkVersion,
12678        __input: &[u8],
12679    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12680        let avail_len = __input.len();
12681        let mut payload_buf = [0; Self::ENCODED_LEN];
12682        let mut buf = if avail_len < Self::ENCODED_LEN {
12683            payload_buf[0..avail_len].copy_from_slice(__input);
12684            Bytes::new(&payload_buf)
12685        } else {
12686            Bytes::new(__input)
12687        };
12688        let mut __struct = Self::default();
12689        let tmp = buf.get_u64_le();
12690        __struct.status = MavGeneratorStatusFlag::from_bits(
12691            tmp & MavGeneratorStatusFlag::all().bits(),
12692        )
12693        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12694            flag_type: "MavGeneratorStatusFlag",
12695            value: tmp as u32,
12696        })?;
12697        __struct.battery_current = buf.get_f32_le();
12698        __struct.load_current = buf.get_f32_le();
12699        __struct.power_generated = buf.get_f32_le();
12700        __struct.bus_voltage = buf.get_f32_le();
12701        __struct.bat_current_setpoint = buf.get_f32_le();
12702        __struct.runtime = buf.get_u32_le();
12703        __struct.time_until_maintenance = buf.get_i32_le();
12704        __struct.generator_speed = buf.get_u16_le();
12705        __struct.rectifier_temperature = buf.get_i16_le();
12706        __struct.generator_temperature = buf.get_i16_le();
12707        Ok(__struct)
12708    }
12709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12710        let mut __tmp = BytesMut::new(bytes);
12711        #[allow(clippy::absurd_extreme_comparisons)]
12712        #[allow(unused_comparisons)]
12713        if __tmp.remaining() < Self::ENCODED_LEN {
12714            panic!(
12715                "buffer is too small (need {} bytes, but got {})",
12716                Self::ENCODED_LEN,
12717                __tmp.remaining(),
12718            )
12719        }
12720        __tmp.put_u64_le(self.status.bits());
12721        __tmp.put_f32_le(self.battery_current);
12722        __tmp.put_f32_le(self.load_current);
12723        __tmp.put_f32_le(self.power_generated);
12724        __tmp.put_f32_le(self.bus_voltage);
12725        __tmp.put_f32_le(self.bat_current_setpoint);
12726        __tmp.put_u32_le(self.runtime);
12727        __tmp.put_i32_le(self.time_until_maintenance);
12728        __tmp.put_u16_le(self.generator_speed);
12729        __tmp.put_i16_le(self.rectifier_temperature);
12730        __tmp.put_i16_le(self.generator_temperature);
12731        if matches!(version, MavlinkVersion::V2) {
12732            let len = __tmp.len();
12733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12734        } else {
12735            __tmp.len()
12736        }
12737    }
12738}
12739#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
12740#[doc = ""]
12741#[doc = "ID: 285"]
12742#[derive(Debug, Clone, PartialEq)]
12743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12744#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12745pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12746    #[doc = "Timestamp (time since system boot)."]
12747    pub time_boot_ms: u32,
12748    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
12749    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12750    pub q: [f32; 4],
12751    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
12752    pub angular_velocity_x: f32,
12753    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
12754    pub angular_velocity_y: f32,
12755    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
12756    pub angular_velocity_z: f32,
12757    #[doc = "Failure flags (0 for no failure)"]
12758    pub failure_flags: GimbalDeviceErrorFlags,
12759    #[doc = "Current gimbal flags set."]
12760    pub flags: GimbalDeviceFlags,
12761    #[doc = "System ID"]
12762    pub target_system: u8,
12763    #[doc = "Component ID"]
12764    pub target_component: u8,
12765    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
12766    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12767    pub delta_yaw: f32,
12768    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
12769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12770    pub delta_yaw_velocity: f32,
12771    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12773    pub gimbal_device_id: u8,
12774}
12775impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12776    pub const ENCODED_LEN: usize = 49usize;
12777    pub const DEFAULT: Self = Self {
12778        time_boot_ms: 0_u32,
12779        q: [0.0_f32; 4usize],
12780        angular_velocity_x: 0.0_f32,
12781        angular_velocity_y: 0.0_f32,
12782        angular_velocity_z: 0.0_f32,
12783        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
12784        flags: GimbalDeviceFlags::DEFAULT,
12785        target_system: 0_u8,
12786        target_component: 0_u8,
12787        delta_yaw: 0.0_f32,
12788        delta_yaw_velocity: 0.0_f32,
12789        gimbal_device_id: 0_u8,
12790    };
12791    #[cfg(feature = "arbitrary")]
12792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12793        use arbitrary::{Arbitrary, Unstructured};
12794        let mut buf = [0u8; 1024];
12795        rng.fill_bytes(&mut buf);
12796        let mut unstructured = Unstructured::new(&buf);
12797        Self::arbitrary(&mut unstructured).unwrap_or_default()
12798    }
12799}
12800impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12801    fn default() -> Self {
12802        Self::DEFAULT.clone()
12803    }
12804}
12805impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12806    type Message = MavMessage;
12807    const ID: u32 = 285u32;
12808    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12809    const EXTRA_CRC: u8 = 137u8;
12810    const ENCODED_LEN: usize = 49usize;
12811    fn deser(
12812        _version: MavlinkVersion,
12813        __input: &[u8],
12814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12815        let avail_len = __input.len();
12816        let mut payload_buf = [0; Self::ENCODED_LEN];
12817        let mut buf = if avail_len < Self::ENCODED_LEN {
12818            payload_buf[0..avail_len].copy_from_slice(__input);
12819            Bytes::new(&payload_buf)
12820        } else {
12821            Bytes::new(__input)
12822        };
12823        let mut __struct = Self::default();
12824        __struct.time_boot_ms = buf.get_u32_le();
12825        for v in &mut __struct.q {
12826            let val = buf.get_f32_le();
12827            *v = val;
12828        }
12829        __struct.angular_velocity_x = buf.get_f32_le();
12830        __struct.angular_velocity_y = buf.get_f32_le();
12831        __struct.angular_velocity_z = buf.get_f32_le();
12832        let tmp = buf.get_u32_le();
12833        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12834            tmp & GimbalDeviceErrorFlags::all().bits(),
12835        )
12836        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12837            flag_type: "GimbalDeviceErrorFlags",
12838            value: tmp as u32,
12839        })?;
12840        let tmp = buf.get_u16_le();
12841        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12842            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12843                flag_type: "GimbalDeviceFlags",
12844                value: tmp as u32,
12845            })?;
12846        __struct.target_system = buf.get_u8();
12847        __struct.target_component = buf.get_u8();
12848        __struct.delta_yaw = buf.get_f32_le();
12849        __struct.delta_yaw_velocity = buf.get_f32_le();
12850        __struct.gimbal_device_id = buf.get_u8();
12851        Ok(__struct)
12852    }
12853    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12854        let mut __tmp = BytesMut::new(bytes);
12855        #[allow(clippy::absurd_extreme_comparisons)]
12856        #[allow(unused_comparisons)]
12857        if __tmp.remaining() < Self::ENCODED_LEN {
12858            panic!(
12859                "buffer is too small (need {} bytes, but got {})",
12860                Self::ENCODED_LEN,
12861                __tmp.remaining(),
12862            )
12863        }
12864        __tmp.put_u32_le(self.time_boot_ms);
12865        for val in &self.q {
12866            __tmp.put_f32_le(*val);
12867        }
12868        __tmp.put_f32_le(self.angular_velocity_x);
12869        __tmp.put_f32_le(self.angular_velocity_y);
12870        __tmp.put_f32_le(self.angular_velocity_z);
12871        __tmp.put_u32_le(self.failure_flags.bits());
12872        __tmp.put_u16_le(self.flags.bits());
12873        __tmp.put_u8(self.target_system);
12874        __tmp.put_u8(self.target_component);
12875        __tmp.put_f32_le(self.delta_yaw);
12876        __tmp.put_f32_le(self.delta_yaw_velocity);
12877        __tmp.put_u8(self.gimbal_device_id);
12878        if matches!(version, MavlinkVersion::V2) {
12879            let len = __tmp.len();
12880            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12881        } else {
12882            __tmp.len()
12883        }
12884    }
12885}
12886#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12887#[doc = ""]
12888#[doc = "ID: 283"]
12889#[derive(Debug, Clone, PartialEq)]
12890#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12891#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12892pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12893    #[doc = "UID of gimbal hardware (0 if unknown)."]
12894    pub uid: u64,
12895    #[doc = "Timestamp (time since system boot)."]
12896    pub time_boot_ms: u32,
12897    #[doc = "0xff)."]
12898    pub firmware_version: u32,
12899    #[doc = "0xff)."]
12900    pub hardware_version: u32,
12901    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12902    pub roll_min: f32,
12903    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12904    pub roll_max: f32,
12905    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12906    pub pitch_min: f32,
12907    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12908    pub pitch_max: f32,
12909    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12910    pub yaw_min: f32,
12911    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12912    pub yaw_max: f32,
12913    #[doc = "Bitmap of gimbal capability flags."]
12914    pub cap_flags: GimbalDeviceCapFlags,
12915    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12916    pub custom_cap_flags: u16,
12917    #[doc = "Name of the gimbal vendor."]
12918    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12919    pub vendor_name: [u8; 32],
12920    #[doc = "Name of the gimbal model."]
12921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12922    pub model_name: [u8; 32],
12923    #[doc = "Custom name of the gimbal given to it by the user."]
12924    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12925    pub custom_name: [u8; 32],
12926    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12928    pub gimbal_device_id: u8,
12929}
12930impl GIMBAL_DEVICE_INFORMATION_DATA {
12931    pub const ENCODED_LEN: usize = 145usize;
12932    pub const DEFAULT: Self = Self {
12933        uid: 0_u64,
12934        time_boot_ms: 0_u32,
12935        firmware_version: 0_u32,
12936        hardware_version: 0_u32,
12937        roll_min: 0.0_f32,
12938        roll_max: 0.0_f32,
12939        pitch_min: 0.0_f32,
12940        pitch_max: 0.0_f32,
12941        yaw_min: 0.0_f32,
12942        yaw_max: 0.0_f32,
12943        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12944        custom_cap_flags: 0_u16,
12945        vendor_name: [0_u8; 32usize],
12946        model_name: [0_u8; 32usize],
12947        custom_name: [0_u8; 32usize],
12948        gimbal_device_id: 0_u8,
12949    };
12950    #[cfg(feature = "arbitrary")]
12951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12952        use arbitrary::{Arbitrary, Unstructured};
12953        let mut buf = [0u8; 1024];
12954        rng.fill_bytes(&mut buf);
12955        let mut unstructured = Unstructured::new(&buf);
12956        Self::arbitrary(&mut unstructured).unwrap_or_default()
12957    }
12958}
12959impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12960    fn default() -> Self {
12961        Self::DEFAULT.clone()
12962    }
12963}
12964impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12965    type Message = MavMessage;
12966    const ID: u32 = 283u32;
12967    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12968    const EXTRA_CRC: u8 = 74u8;
12969    const ENCODED_LEN: usize = 145usize;
12970    fn deser(
12971        _version: MavlinkVersion,
12972        __input: &[u8],
12973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12974        let avail_len = __input.len();
12975        let mut payload_buf = [0; Self::ENCODED_LEN];
12976        let mut buf = if avail_len < Self::ENCODED_LEN {
12977            payload_buf[0..avail_len].copy_from_slice(__input);
12978            Bytes::new(&payload_buf)
12979        } else {
12980            Bytes::new(__input)
12981        };
12982        let mut __struct = Self::default();
12983        __struct.uid = buf.get_u64_le();
12984        __struct.time_boot_ms = buf.get_u32_le();
12985        __struct.firmware_version = buf.get_u32_le();
12986        __struct.hardware_version = buf.get_u32_le();
12987        __struct.roll_min = buf.get_f32_le();
12988        __struct.roll_max = buf.get_f32_le();
12989        __struct.pitch_min = buf.get_f32_le();
12990        __struct.pitch_max = buf.get_f32_le();
12991        __struct.yaw_min = buf.get_f32_le();
12992        __struct.yaw_max = buf.get_f32_le();
12993        let tmp = buf.get_u16_le();
12994        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12995            tmp & GimbalDeviceCapFlags::all().bits(),
12996        )
12997        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12998            flag_type: "GimbalDeviceCapFlags",
12999            value: tmp as u32,
13000        })?;
13001        __struct.custom_cap_flags = buf.get_u16_le();
13002        for v in &mut __struct.vendor_name {
13003            let val = buf.get_u8();
13004            *v = val;
13005        }
13006        for v in &mut __struct.model_name {
13007            let val = buf.get_u8();
13008            *v = val;
13009        }
13010        for v in &mut __struct.custom_name {
13011            let val = buf.get_u8();
13012            *v = val;
13013        }
13014        __struct.gimbal_device_id = buf.get_u8();
13015        Ok(__struct)
13016    }
13017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13018        let mut __tmp = BytesMut::new(bytes);
13019        #[allow(clippy::absurd_extreme_comparisons)]
13020        #[allow(unused_comparisons)]
13021        if __tmp.remaining() < Self::ENCODED_LEN {
13022            panic!(
13023                "buffer is too small (need {} bytes, but got {})",
13024                Self::ENCODED_LEN,
13025                __tmp.remaining(),
13026            )
13027        }
13028        __tmp.put_u64_le(self.uid);
13029        __tmp.put_u32_le(self.time_boot_ms);
13030        __tmp.put_u32_le(self.firmware_version);
13031        __tmp.put_u32_le(self.hardware_version);
13032        __tmp.put_f32_le(self.roll_min);
13033        __tmp.put_f32_le(self.roll_max);
13034        __tmp.put_f32_le(self.pitch_min);
13035        __tmp.put_f32_le(self.pitch_max);
13036        __tmp.put_f32_le(self.yaw_min);
13037        __tmp.put_f32_le(self.yaw_max);
13038        __tmp.put_u16_le(self.cap_flags.bits());
13039        __tmp.put_u16_le(self.custom_cap_flags);
13040        for val in &self.vendor_name {
13041            __tmp.put_u8(*val);
13042        }
13043        for val in &self.model_name {
13044            __tmp.put_u8(*val);
13045        }
13046        for val in &self.custom_name {
13047            __tmp.put_u8(*val);
13048        }
13049        __tmp.put_u8(self.gimbal_device_id);
13050        if matches!(version, MavlinkVersion::V2) {
13051            let len = __tmp.len();
13052            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13053        } else {
13054            __tmp.len()
13055        }
13056    }
13057}
13058#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
13059#[doc = ""]
13060#[doc = "ID: 284"]
13061#[derive(Debug, Clone, PartialEq)]
13062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13064pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13065    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
13066    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13067    pub q: [f32; 4],
13068    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
13069    pub angular_velocity_x: f32,
13070    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
13071    pub angular_velocity_y: f32,
13072    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
13073    pub angular_velocity_z: f32,
13074    #[doc = "Low level gimbal flags."]
13075    pub flags: GimbalDeviceFlags,
13076    #[doc = "System ID"]
13077    pub target_system: u8,
13078    #[doc = "Component ID"]
13079    pub target_component: u8,
13080}
13081impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13082    pub const ENCODED_LEN: usize = 32usize;
13083    pub const DEFAULT: Self = Self {
13084        q: [0.0_f32; 4usize],
13085        angular_velocity_x: 0.0_f32,
13086        angular_velocity_y: 0.0_f32,
13087        angular_velocity_z: 0.0_f32,
13088        flags: GimbalDeviceFlags::DEFAULT,
13089        target_system: 0_u8,
13090        target_component: 0_u8,
13091    };
13092    #[cfg(feature = "arbitrary")]
13093    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13094        use arbitrary::{Arbitrary, Unstructured};
13095        let mut buf = [0u8; 1024];
13096        rng.fill_bytes(&mut buf);
13097        let mut unstructured = Unstructured::new(&buf);
13098        Self::arbitrary(&mut unstructured).unwrap_or_default()
13099    }
13100}
13101impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13102    fn default() -> Self {
13103        Self::DEFAULT.clone()
13104    }
13105}
13106impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
13107    type Message = MavMessage;
13108    const ID: u32 = 284u32;
13109    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
13110    const EXTRA_CRC: u8 = 99u8;
13111    const ENCODED_LEN: usize = 32usize;
13112    fn deser(
13113        _version: MavlinkVersion,
13114        __input: &[u8],
13115    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13116        let avail_len = __input.len();
13117        let mut payload_buf = [0; Self::ENCODED_LEN];
13118        let mut buf = if avail_len < Self::ENCODED_LEN {
13119            payload_buf[0..avail_len].copy_from_slice(__input);
13120            Bytes::new(&payload_buf)
13121        } else {
13122            Bytes::new(__input)
13123        };
13124        let mut __struct = Self::default();
13125        for v in &mut __struct.q {
13126            let val = buf.get_f32_le();
13127            *v = val;
13128        }
13129        __struct.angular_velocity_x = buf.get_f32_le();
13130        __struct.angular_velocity_y = buf.get_f32_le();
13131        __struct.angular_velocity_z = buf.get_f32_le();
13132        let tmp = buf.get_u16_le();
13133        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
13134            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13135                flag_type: "GimbalDeviceFlags",
13136                value: tmp as u32,
13137            })?;
13138        __struct.target_system = buf.get_u8();
13139        __struct.target_component = buf.get_u8();
13140        Ok(__struct)
13141    }
13142    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13143        let mut __tmp = BytesMut::new(bytes);
13144        #[allow(clippy::absurd_extreme_comparisons)]
13145        #[allow(unused_comparisons)]
13146        if __tmp.remaining() < Self::ENCODED_LEN {
13147            panic!(
13148                "buffer is too small (need {} bytes, but got {})",
13149                Self::ENCODED_LEN,
13150                __tmp.remaining(),
13151            )
13152        }
13153        for val in &self.q {
13154            __tmp.put_f32_le(*val);
13155        }
13156        __tmp.put_f32_le(self.angular_velocity_x);
13157        __tmp.put_f32_le(self.angular_velocity_y);
13158        __tmp.put_f32_le(self.angular_velocity_z);
13159        __tmp.put_u16_le(self.flags.bits());
13160        __tmp.put_u8(self.target_system);
13161        __tmp.put_u8(self.target_component);
13162        if matches!(version, MavlinkVersion::V2) {
13163            let len = __tmp.len();
13164            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13165        } else {
13166            __tmp.len()
13167        }
13168    }
13169}
13170#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
13171#[doc = ""]
13172#[doc = "ID: 280"]
13173#[derive(Debug, Clone, PartialEq)]
13174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13176pub struct GIMBAL_MANAGER_INFORMATION_DATA {
13177    #[doc = "Timestamp (time since system boot)."]
13178    pub time_boot_ms: u32,
13179    #[doc = "Bitmap of gimbal capability flags."]
13180    pub cap_flags: GimbalManagerCapFlags,
13181    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13182    pub roll_min: f32,
13183    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
13184    pub roll_max: f32,
13185    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
13186    pub pitch_min: f32,
13187    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
13188    pub pitch_max: f32,
13189    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
13190    pub yaw_min: f32,
13191    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
13192    pub yaw_max: f32,
13193    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13194    pub gimbal_device_id: u8,
13195}
13196impl GIMBAL_MANAGER_INFORMATION_DATA {
13197    pub const ENCODED_LEN: usize = 33usize;
13198    pub const DEFAULT: Self = Self {
13199        time_boot_ms: 0_u32,
13200        cap_flags: GimbalManagerCapFlags::DEFAULT,
13201        roll_min: 0.0_f32,
13202        roll_max: 0.0_f32,
13203        pitch_min: 0.0_f32,
13204        pitch_max: 0.0_f32,
13205        yaw_min: 0.0_f32,
13206        yaw_max: 0.0_f32,
13207        gimbal_device_id: 0_u8,
13208    };
13209    #[cfg(feature = "arbitrary")]
13210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13211        use arbitrary::{Arbitrary, Unstructured};
13212        let mut buf = [0u8; 1024];
13213        rng.fill_bytes(&mut buf);
13214        let mut unstructured = Unstructured::new(&buf);
13215        Self::arbitrary(&mut unstructured).unwrap_or_default()
13216    }
13217}
13218impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
13219    fn default() -> Self {
13220        Self::DEFAULT.clone()
13221    }
13222}
13223impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
13224    type Message = MavMessage;
13225    const ID: u32 = 280u32;
13226    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
13227    const EXTRA_CRC: u8 = 70u8;
13228    const ENCODED_LEN: usize = 33usize;
13229    fn deser(
13230        _version: MavlinkVersion,
13231        __input: &[u8],
13232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13233        let avail_len = __input.len();
13234        let mut payload_buf = [0; Self::ENCODED_LEN];
13235        let mut buf = if avail_len < Self::ENCODED_LEN {
13236            payload_buf[0..avail_len].copy_from_slice(__input);
13237            Bytes::new(&payload_buf)
13238        } else {
13239            Bytes::new(__input)
13240        };
13241        let mut __struct = Self::default();
13242        __struct.time_boot_ms = buf.get_u32_le();
13243        let tmp = buf.get_u32_le();
13244        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
13245            tmp & GimbalManagerCapFlags::all().bits(),
13246        )
13247        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13248            flag_type: "GimbalManagerCapFlags",
13249            value: tmp as u32,
13250        })?;
13251        __struct.roll_min = buf.get_f32_le();
13252        __struct.roll_max = buf.get_f32_le();
13253        __struct.pitch_min = buf.get_f32_le();
13254        __struct.pitch_max = buf.get_f32_le();
13255        __struct.yaw_min = buf.get_f32_le();
13256        __struct.yaw_max = buf.get_f32_le();
13257        __struct.gimbal_device_id = buf.get_u8();
13258        Ok(__struct)
13259    }
13260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13261        let mut __tmp = BytesMut::new(bytes);
13262        #[allow(clippy::absurd_extreme_comparisons)]
13263        #[allow(unused_comparisons)]
13264        if __tmp.remaining() < Self::ENCODED_LEN {
13265            panic!(
13266                "buffer is too small (need {} bytes, but got {})",
13267                Self::ENCODED_LEN,
13268                __tmp.remaining(),
13269            )
13270        }
13271        __tmp.put_u32_le(self.time_boot_ms);
13272        __tmp.put_u32_le(self.cap_flags.bits());
13273        __tmp.put_f32_le(self.roll_min);
13274        __tmp.put_f32_le(self.roll_max);
13275        __tmp.put_f32_le(self.pitch_min);
13276        __tmp.put_f32_le(self.pitch_max);
13277        __tmp.put_f32_le(self.yaw_min);
13278        __tmp.put_f32_le(self.yaw_max);
13279        __tmp.put_u8(self.gimbal_device_id);
13280        if matches!(version, MavlinkVersion::V2) {
13281            let len = __tmp.len();
13282            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13283        } else {
13284            __tmp.len()
13285        }
13286    }
13287}
13288#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13289#[doc = ""]
13290#[doc = "ID: 282"]
13291#[derive(Debug, Clone, PartialEq)]
13292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13294pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13295    #[doc = "High level gimbal manager flags to use."]
13296    pub flags: GimbalManagerFlags,
13297    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
13298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13299    pub q: [f32; 4],
13300    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
13301    pub angular_velocity_x: f32,
13302    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
13303    pub angular_velocity_y: f32,
13304    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
13305    pub angular_velocity_z: f32,
13306    #[doc = "System ID"]
13307    pub target_system: u8,
13308    #[doc = "Component ID"]
13309    pub target_component: u8,
13310    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13311    pub gimbal_device_id: u8,
13312}
13313impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13314    pub const ENCODED_LEN: usize = 35usize;
13315    pub const DEFAULT: Self = Self {
13316        flags: GimbalManagerFlags::DEFAULT,
13317        q: [0.0_f32; 4usize],
13318        angular_velocity_x: 0.0_f32,
13319        angular_velocity_y: 0.0_f32,
13320        angular_velocity_z: 0.0_f32,
13321        target_system: 0_u8,
13322        target_component: 0_u8,
13323        gimbal_device_id: 0_u8,
13324    };
13325    #[cfg(feature = "arbitrary")]
13326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13327        use arbitrary::{Arbitrary, Unstructured};
13328        let mut buf = [0u8; 1024];
13329        rng.fill_bytes(&mut buf);
13330        let mut unstructured = Unstructured::new(&buf);
13331        Self::arbitrary(&mut unstructured).unwrap_or_default()
13332    }
13333}
13334impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13335    fn default() -> Self {
13336        Self::DEFAULT.clone()
13337    }
13338}
13339impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
13340    type Message = MavMessage;
13341    const ID: u32 = 282u32;
13342    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
13343    const EXTRA_CRC: u8 = 123u8;
13344    const ENCODED_LEN: usize = 35usize;
13345    fn deser(
13346        _version: MavlinkVersion,
13347        __input: &[u8],
13348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13349        let avail_len = __input.len();
13350        let mut payload_buf = [0; Self::ENCODED_LEN];
13351        let mut buf = if avail_len < Self::ENCODED_LEN {
13352            payload_buf[0..avail_len].copy_from_slice(__input);
13353            Bytes::new(&payload_buf)
13354        } else {
13355            Bytes::new(__input)
13356        };
13357        let mut __struct = Self::default();
13358        let tmp = buf.get_u32_le();
13359        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13360            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13361                flag_type: "GimbalManagerFlags",
13362                value: tmp as u32,
13363            })?;
13364        for v in &mut __struct.q {
13365            let val = buf.get_f32_le();
13366            *v = val;
13367        }
13368        __struct.angular_velocity_x = buf.get_f32_le();
13369        __struct.angular_velocity_y = buf.get_f32_le();
13370        __struct.angular_velocity_z = buf.get_f32_le();
13371        __struct.target_system = buf.get_u8();
13372        __struct.target_component = buf.get_u8();
13373        __struct.gimbal_device_id = buf.get_u8();
13374        Ok(__struct)
13375    }
13376    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13377        let mut __tmp = BytesMut::new(bytes);
13378        #[allow(clippy::absurd_extreme_comparisons)]
13379        #[allow(unused_comparisons)]
13380        if __tmp.remaining() < Self::ENCODED_LEN {
13381            panic!(
13382                "buffer is too small (need {} bytes, but got {})",
13383                Self::ENCODED_LEN,
13384                __tmp.remaining(),
13385            )
13386        }
13387        __tmp.put_u32_le(self.flags.bits());
13388        for val in &self.q {
13389            __tmp.put_f32_le(*val);
13390        }
13391        __tmp.put_f32_le(self.angular_velocity_x);
13392        __tmp.put_f32_le(self.angular_velocity_y);
13393        __tmp.put_f32_le(self.angular_velocity_z);
13394        __tmp.put_u8(self.target_system);
13395        __tmp.put_u8(self.target_component);
13396        __tmp.put_u8(self.gimbal_device_id);
13397        if matches!(version, MavlinkVersion::V2) {
13398            let len = __tmp.len();
13399            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13400        } else {
13401            __tmp.len()
13402        }
13403    }
13404}
13405#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
13406#[doc = ""]
13407#[doc = "ID: 288"]
13408#[derive(Debug, Clone, PartialEq)]
13409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13411pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13412    #[doc = "High level gimbal manager flags."]
13413    pub flags: GimbalManagerFlags,
13414    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13415    pub pitch: f32,
13416    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13417    pub yaw: f32,
13418    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
13419    pub pitch_rate: f32,
13420    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
13421    pub yaw_rate: f32,
13422    #[doc = "System ID"]
13423    pub target_system: u8,
13424    #[doc = "Component ID"]
13425    pub target_component: u8,
13426    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13427    pub gimbal_device_id: u8,
13428}
13429impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13430    pub const ENCODED_LEN: usize = 23usize;
13431    pub const DEFAULT: Self = Self {
13432        flags: GimbalManagerFlags::DEFAULT,
13433        pitch: 0.0_f32,
13434        yaw: 0.0_f32,
13435        pitch_rate: 0.0_f32,
13436        yaw_rate: 0.0_f32,
13437        target_system: 0_u8,
13438        target_component: 0_u8,
13439        gimbal_device_id: 0_u8,
13440    };
13441    #[cfg(feature = "arbitrary")]
13442    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13443        use arbitrary::{Arbitrary, Unstructured};
13444        let mut buf = [0u8; 1024];
13445        rng.fill_bytes(&mut buf);
13446        let mut unstructured = Unstructured::new(&buf);
13447        Self::arbitrary(&mut unstructured).unwrap_or_default()
13448    }
13449}
13450impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13451    fn default() -> Self {
13452        Self::DEFAULT.clone()
13453    }
13454}
13455impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
13456    type Message = MavMessage;
13457    const ID: u32 = 288u32;
13458    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
13459    const EXTRA_CRC: u8 = 20u8;
13460    const ENCODED_LEN: usize = 23usize;
13461    fn deser(
13462        _version: MavlinkVersion,
13463        __input: &[u8],
13464    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13465        let avail_len = __input.len();
13466        let mut payload_buf = [0; Self::ENCODED_LEN];
13467        let mut buf = if avail_len < Self::ENCODED_LEN {
13468            payload_buf[0..avail_len].copy_from_slice(__input);
13469            Bytes::new(&payload_buf)
13470        } else {
13471            Bytes::new(__input)
13472        };
13473        let mut __struct = Self::default();
13474        let tmp = buf.get_u32_le();
13475        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13476            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13477                flag_type: "GimbalManagerFlags",
13478                value: tmp as u32,
13479            })?;
13480        __struct.pitch = buf.get_f32_le();
13481        __struct.yaw = buf.get_f32_le();
13482        __struct.pitch_rate = buf.get_f32_le();
13483        __struct.yaw_rate = buf.get_f32_le();
13484        __struct.target_system = buf.get_u8();
13485        __struct.target_component = buf.get_u8();
13486        __struct.gimbal_device_id = buf.get_u8();
13487        Ok(__struct)
13488    }
13489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13490        let mut __tmp = BytesMut::new(bytes);
13491        #[allow(clippy::absurd_extreme_comparisons)]
13492        #[allow(unused_comparisons)]
13493        if __tmp.remaining() < Self::ENCODED_LEN {
13494            panic!(
13495                "buffer is too small (need {} bytes, but got {})",
13496                Self::ENCODED_LEN,
13497                __tmp.remaining(),
13498            )
13499        }
13500        __tmp.put_u32_le(self.flags.bits());
13501        __tmp.put_f32_le(self.pitch);
13502        __tmp.put_f32_le(self.yaw);
13503        __tmp.put_f32_le(self.pitch_rate);
13504        __tmp.put_f32_le(self.yaw_rate);
13505        __tmp.put_u8(self.target_system);
13506        __tmp.put_u8(self.target_component);
13507        __tmp.put_u8(self.gimbal_device_id);
13508        if matches!(version, MavlinkVersion::V2) {
13509            let len = __tmp.len();
13510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13511        } else {
13512            __tmp.len()
13513        }
13514    }
13515}
13516#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
13517#[doc = ""]
13518#[doc = "ID: 287"]
13519#[derive(Debug, Clone, PartialEq)]
13520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13522pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13523    #[doc = "High level gimbal manager flags to use."]
13524    pub flags: GimbalManagerFlags,
13525    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
13526    pub pitch: f32,
13527    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
13528    pub yaw: f32,
13529    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
13530    pub pitch_rate: f32,
13531    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
13532    pub yaw_rate: f32,
13533    #[doc = "System ID"]
13534    pub target_system: u8,
13535    #[doc = "Component ID"]
13536    pub target_component: u8,
13537    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
13538    pub gimbal_device_id: u8,
13539}
13540impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13541    pub const ENCODED_LEN: usize = 23usize;
13542    pub const DEFAULT: Self = Self {
13543        flags: GimbalManagerFlags::DEFAULT,
13544        pitch: 0.0_f32,
13545        yaw: 0.0_f32,
13546        pitch_rate: 0.0_f32,
13547        yaw_rate: 0.0_f32,
13548        target_system: 0_u8,
13549        target_component: 0_u8,
13550        gimbal_device_id: 0_u8,
13551    };
13552    #[cfg(feature = "arbitrary")]
13553    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13554        use arbitrary::{Arbitrary, Unstructured};
13555        let mut buf = [0u8; 1024];
13556        rng.fill_bytes(&mut buf);
13557        let mut unstructured = Unstructured::new(&buf);
13558        Self::arbitrary(&mut unstructured).unwrap_or_default()
13559    }
13560}
13561impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13562    fn default() -> Self {
13563        Self::DEFAULT.clone()
13564    }
13565}
13566impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
13567    type Message = MavMessage;
13568    const ID: u32 = 287u32;
13569    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
13570    const EXTRA_CRC: u8 = 1u8;
13571    const ENCODED_LEN: usize = 23usize;
13572    fn deser(
13573        _version: MavlinkVersion,
13574        __input: &[u8],
13575    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13576        let avail_len = __input.len();
13577        let mut payload_buf = [0; Self::ENCODED_LEN];
13578        let mut buf = if avail_len < Self::ENCODED_LEN {
13579            payload_buf[0..avail_len].copy_from_slice(__input);
13580            Bytes::new(&payload_buf)
13581        } else {
13582            Bytes::new(__input)
13583        };
13584        let mut __struct = Self::default();
13585        let tmp = buf.get_u32_le();
13586        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13587            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13588                flag_type: "GimbalManagerFlags",
13589                value: tmp as u32,
13590            })?;
13591        __struct.pitch = buf.get_f32_le();
13592        __struct.yaw = buf.get_f32_le();
13593        __struct.pitch_rate = buf.get_f32_le();
13594        __struct.yaw_rate = buf.get_f32_le();
13595        __struct.target_system = buf.get_u8();
13596        __struct.target_component = buf.get_u8();
13597        __struct.gimbal_device_id = buf.get_u8();
13598        Ok(__struct)
13599    }
13600    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13601        let mut __tmp = BytesMut::new(bytes);
13602        #[allow(clippy::absurd_extreme_comparisons)]
13603        #[allow(unused_comparisons)]
13604        if __tmp.remaining() < Self::ENCODED_LEN {
13605            panic!(
13606                "buffer is too small (need {} bytes, but got {})",
13607                Self::ENCODED_LEN,
13608                __tmp.remaining(),
13609            )
13610        }
13611        __tmp.put_u32_le(self.flags.bits());
13612        __tmp.put_f32_le(self.pitch);
13613        __tmp.put_f32_le(self.yaw);
13614        __tmp.put_f32_le(self.pitch_rate);
13615        __tmp.put_f32_le(self.yaw_rate);
13616        __tmp.put_u8(self.target_system);
13617        __tmp.put_u8(self.target_component);
13618        __tmp.put_u8(self.gimbal_device_id);
13619        if matches!(version, MavlinkVersion::V2) {
13620            let len = __tmp.len();
13621            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13622        } else {
13623            __tmp.len()
13624        }
13625    }
13626}
13627#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
13628#[doc = ""]
13629#[doc = "ID: 281"]
13630#[derive(Debug, Clone, PartialEq)]
13631#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13632#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13633pub struct GIMBAL_MANAGER_STATUS_DATA {
13634    #[doc = "Timestamp (time since system boot)."]
13635    pub time_boot_ms: u32,
13636    #[doc = "High level gimbal manager flags currently applied."]
13637    pub flags: GimbalManagerFlags,
13638    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
13639    pub gimbal_device_id: u8,
13640    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
13641    pub primary_control_sysid: u8,
13642    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
13643    pub primary_control_compid: u8,
13644    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
13645    pub secondary_control_sysid: u8,
13646    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
13647    pub secondary_control_compid: u8,
13648}
13649impl GIMBAL_MANAGER_STATUS_DATA {
13650    pub const ENCODED_LEN: usize = 13usize;
13651    pub const DEFAULT: Self = Self {
13652        time_boot_ms: 0_u32,
13653        flags: GimbalManagerFlags::DEFAULT,
13654        gimbal_device_id: 0_u8,
13655        primary_control_sysid: 0_u8,
13656        primary_control_compid: 0_u8,
13657        secondary_control_sysid: 0_u8,
13658        secondary_control_compid: 0_u8,
13659    };
13660    #[cfg(feature = "arbitrary")]
13661    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13662        use arbitrary::{Arbitrary, Unstructured};
13663        let mut buf = [0u8; 1024];
13664        rng.fill_bytes(&mut buf);
13665        let mut unstructured = Unstructured::new(&buf);
13666        Self::arbitrary(&mut unstructured).unwrap_or_default()
13667    }
13668}
13669impl Default for GIMBAL_MANAGER_STATUS_DATA {
13670    fn default() -> Self {
13671        Self::DEFAULT.clone()
13672    }
13673}
13674impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
13675    type Message = MavMessage;
13676    const ID: u32 = 281u32;
13677    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
13678    const EXTRA_CRC: u8 = 48u8;
13679    const ENCODED_LEN: usize = 13usize;
13680    fn deser(
13681        _version: MavlinkVersion,
13682        __input: &[u8],
13683    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13684        let avail_len = __input.len();
13685        let mut payload_buf = [0; Self::ENCODED_LEN];
13686        let mut buf = if avail_len < Self::ENCODED_LEN {
13687            payload_buf[0..avail_len].copy_from_slice(__input);
13688            Bytes::new(&payload_buf)
13689        } else {
13690            Bytes::new(__input)
13691        };
13692        let mut __struct = Self::default();
13693        __struct.time_boot_ms = buf.get_u32_le();
13694        let tmp = buf.get_u32_le();
13695        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
13696            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13697                flag_type: "GimbalManagerFlags",
13698                value: tmp as u32,
13699            })?;
13700        __struct.gimbal_device_id = buf.get_u8();
13701        __struct.primary_control_sysid = buf.get_u8();
13702        __struct.primary_control_compid = buf.get_u8();
13703        __struct.secondary_control_sysid = buf.get_u8();
13704        __struct.secondary_control_compid = buf.get_u8();
13705        Ok(__struct)
13706    }
13707    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13708        let mut __tmp = BytesMut::new(bytes);
13709        #[allow(clippy::absurd_extreme_comparisons)]
13710        #[allow(unused_comparisons)]
13711        if __tmp.remaining() < Self::ENCODED_LEN {
13712            panic!(
13713                "buffer is too small (need {} bytes, but got {})",
13714                Self::ENCODED_LEN,
13715                __tmp.remaining(),
13716            )
13717        }
13718        __tmp.put_u32_le(self.time_boot_ms);
13719        __tmp.put_u32_le(self.flags.bits());
13720        __tmp.put_u8(self.gimbal_device_id);
13721        __tmp.put_u8(self.primary_control_sysid);
13722        __tmp.put_u8(self.primary_control_compid);
13723        __tmp.put_u8(self.secondary_control_sysid);
13724        __tmp.put_u8(self.secondary_control_compid);
13725        if matches!(version, MavlinkVersion::V2) {
13726            let len = __tmp.len();
13727            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13728        } else {
13729            __tmp.len()
13730        }
13731    }
13732}
13733#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
13734#[doc = ""]
13735#[doc = "ID: 33"]
13736#[derive(Debug, Clone, PartialEq)]
13737#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13738#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13739pub struct GLOBAL_POSITION_INT_DATA {
13740    #[doc = "Timestamp (time since system boot)."]
13741    pub time_boot_ms: u32,
13742    #[doc = "Latitude, expressed"]
13743    pub lat: i32,
13744    #[doc = "Longitude, expressed"]
13745    pub lon: i32,
13746    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
13747    pub alt: i32,
13748    #[doc = "Altitude above home"]
13749    pub relative_alt: i32,
13750    #[doc = "Ground X Speed (Latitude, positive north)"]
13751    pub vx: i16,
13752    #[doc = "Ground Y Speed (Longitude, positive east)"]
13753    pub vy: i16,
13754    #[doc = "Ground Z Speed (Altitude, positive down)"]
13755    pub vz: i16,
13756    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13757    pub hdg: u16,
13758}
13759impl GLOBAL_POSITION_INT_DATA {
13760    pub const ENCODED_LEN: usize = 28usize;
13761    pub const DEFAULT: Self = Self {
13762        time_boot_ms: 0_u32,
13763        lat: 0_i32,
13764        lon: 0_i32,
13765        alt: 0_i32,
13766        relative_alt: 0_i32,
13767        vx: 0_i16,
13768        vy: 0_i16,
13769        vz: 0_i16,
13770        hdg: 0_u16,
13771    };
13772    #[cfg(feature = "arbitrary")]
13773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13774        use arbitrary::{Arbitrary, Unstructured};
13775        let mut buf = [0u8; 1024];
13776        rng.fill_bytes(&mut buf);
13777        let mut unstructured = Unstructured::new(&buf);
13778        Self::arbitrary(&mut unstructured).unwrap_or_default()
13779    }
13780}
13781impl Default for GLOBAL_POSITION_INT_DATA {
13782    fn default() -> Self {
13783        Self::DEFAULT.clone()
13784    }
13785}
13786impl MessageData for GLOBAL_POSITION_INT_DATA {
13787    type Message = MavMessage;
13788    const ID: u32 = 33u32;
13789    const NAME: &'static str = "GLOBAL_POSITION_INT";
13790    const EXTRA_CRC: u8 = 104u8;
13791    const ENCODED_LEN: usize = 28usize;
13792    fn deser(
13793        _version: MavlinkVersion,
13794        __input: &[u8],
13795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13796        let avail_len = __input.len();
13797        let mut payload_buf = [0; Self::ENCODED_LEN];
13798        let mut buf = if avail_len < Self::ENCODED_LEN {
13799            payload_buf[0..avail_len].copy_from_slice(__input);
13800            Bytes::new(&payload_buf)
13801        } else {
13802            Bytes::new(__input)
13803        };
13804        let mut __struct = Self::default();
13805        __struct.time_boot_ms = buf.get_u32_le();
13806        __struct.lat = buf.get_i32_le();
13807        __struct.lon = buf.get_i32_le();
13808        __struct.alt = buf.get_i32_le();
13809        __struct.relative_alt = buf.get_i32_le();
13810        __struct.vx = buf.get_i16_le();
13811        __struct.vy = buf.get_i16_le();
13812        __struct.vz = buf.get_i16_le();
13813        __struct.hdg = buf.get_u16_le();
13814        Ok(__struct)
13815    }
13816    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13817        let mut __tmp = BytesMut::new(bytes);
13818        #[allow(clippy::absurd_extreme_comparisons)]
13819        #[allow(unused_comparisons)]
13820        if __tmp.remaining() < Self::ENCODED_LEN {
13821            panic!(
13822                "buffer is too small (need {} bytes, but got {})",
13823                Self::ENCODED_LEN,
13824                __tmp.remaining(),
13825            )
13826        }
13827        __tmp.put_u32_le(self.time_boot_ms);
13828        __tmp.put_i32_le(self.lat);
13829        __tmp.put_i32_le(self.lon);
13830        __tmp.put_i32_le(self.alt);
13831        __tmp.put_i32_le(self.relative_alt);
13832        __tmp.put_i16_le(self.vx);
13833        __tmp.put_i16_le(self.vy);
13834        __tmp.put_i16_le(self.vz);
13835        __tmp.put_u16_le(self.hdg);
13836        if matches!(version, MavlinkVersion::V2) {
13837            let len = __tmp.len();
13838            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13839        } else {
13840            __tmp.len()
13841        }
13842    }
13843}
13844#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13845#[doc = ""]
13846#[doc = "ID: 63"]
13847#[derive(Debug, Clone, PartialEq)]
13848#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13849#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13850pub struct GLOBAL_POSITION_INT_COV_DATA {
13851    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13852    pub time_usec: u64,
13853    #[doc = "Latitude"]
13854    pub lat: i32,
13855    #[doc = "Longitude"]
13856    pub lon: i32,
13857    #[doc = "Altitude in meters above MSL"]
13858    pub alt: i32,
13859    #[doc = "Altitude above ground"]
13860    pub relative_alt: i32,
13861    #[doc = "Ground X Speed (Latitude)"]
13862    pub vx: f32,
13863    #[doc = "Ground Y Speed (Longitude)"]
13864    pub vy: f32,
13865    #[doc = "Ground Z Speed (Altitude)"]
13866    pub vz: f32,
13867    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13869    pub covariance: [f32; 36],
13870    #[doc = "Class id of the estimator this estimate originated from."]
13871    pub estimator_type: MavEstimatorType,
13872}
13873impl GLOBAL_POSITION_INT_COV_DATA {
13874    pub const ENCODED_LEN: usize = 181usize;
13875    pub const DEFAULT: Self = Self {
13876        time_usec: 0_u64,
13877        lat: 0_i32,
13878        lon: 0_i32,
13879        alt: 0_i32,
13880        relative_alt: 0_i32,
13881        vx: 0.0_f32,
13882        vy: 0.0_f32,
13883        vz: 0.0_f32,
13884        covariance: [0.0_f32; 36usize],
13885        estimator_type: MavEstimatorType::DEFAULT,
13886    };
13887    #[cfg(feature = "arbitrary")]
13888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13889        use arbitrary::{Arbitrary, Unstructured};
13890        let mut buf = [0u8; 1024];
13891        rng.fill_bytes(&mut buf);
13892        let mut unstructured = Unstructured::new(&buf);
13893        Self::arbitrary(&mut unstructured).unwrap_or_default()
13894    }
13895}
13896impl Default for GLOBAL_POSITION_INT_COV_DATA {
13897    fn default() -> Self {
13898        Self::DEFAULT.clone()
13899    }
13900}
13901impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13902    type Message = MavMessage;
13903    const ID: u32 = 63u32;
13904    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13905    const EXTRA_CRC: u8 = 119u8;
13906    const ENCODED_LEN: usize = 181usize;
13907    fn deser(
13908        _version: MavlinkVersion,
13909        __input: &[u8],
13910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13911        let avail_len = __input.len();
13912        let mut payload_buf = [0; Self::ENCODED_LEN];
13913        let mut buf = if avail_len < Self::ENCODED_LEN {
13914            payload_buf[0..avail_len].copy_from_slice(__input);
13915            Bytes::new(&payload_buf)
13916        } else {
13917            Bytes::new(__input)
13918        };
13919        let mut __struct = Self::default();
13920        __struct.time_usec = buf.get_u64_le();
13921        __struct.lat = buf.get_i32_le();
13922        __struct.lon = buf.get_i32_le();
13923        __struct.alt = buf.get_i32_le();
13924        __struct.relative_alt = buf.get_i32_le();
13925        __struct.vx = buf.get_f32_le();
13926        __struct.vy = buf.get_f32_le();
13927        __struct.vz = buf.get_f32_le();
13928        for v in &mut __struct.covariance {
13929            let val = buf.get_f32_le();
13930            *v = val;
13931        }
13932        let tmp = buf.get_u8();
13933        __struct.estimator_type =
13934            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13935                enum_type: "MavEstimatorType",
13936                value: tmp as u32,
13937            })?;
13938        Ok(__struct)
13939    }
13940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13941        let mut __tmp = BytesMut::new(bytes);
13942        #[allow(clippy::absurd_extreme_comparisons)]
13943        #[allow(unused_comparisons)]
13944        if __tmp.remaining() < Self::ENCODED_LEN {
13945            panic!(
13946                "buffer is too small (need {} bytes, but got {})",
13947                Self::ENCODED_LEN,
13948                __tmp.remaining(),
13949            )
13950        }
13951        __tmp.put_u64_le(self.time_usec);
13952        __tmp.put_i32_le(self.lat);
13953        __tmp.put_i32_le(self.lon);
13954        __tmp.put_i32_le(self.alt);
13955        __tmp.put_i32_le(self.relative_alt);
13956        __tmp.put_f32_le(self.vx);
13957        __tmp.put_f32_le(self.vy);
13958        __tmp.put_f32_le(self.vz);
13959        for val in &self.covariance {
13960            __tmp.put_f32_le(*val);
13961        }
13962        __tmp.put_u8(self.estimator_type as u8);
13963        if matches!(version, MavlinkVersion::V2) {
13964            let len = __tmp.len();
13965            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13966        } else {
13967            __tmp.len()
13968        }
13969    }
13970}
13971#[doc = "Global position/attitude estimate from a vision source."]
13972#[doc = ""]
13973#[doc = "ID: 101"]
13974#[derive(Debug, Clone, PartialEq)]
13975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13977pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13978    #[doc = "Timestamp (UNIX time or since system boot)"]
13979    pub usec: u64,
13980    #[doc = "Global X position"]
13981    pub x: f32,
13982    #[doc = "Global Y position"]
13983    pub y: f32,
13984    #[doc = "Global Z position"]
13985    pub z: f32,
13986    #[doc = "Roll angle"]
13987    pub roll: f32,
13988    #[doc = "Pitch angle"]
13989    pub pitch: f32,
13990    #[doc = "Yaw angle"]
13991    pub yaw: f32,
13992    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13993    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13994    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13995    pub covariance: [f32; 21],
13996    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13997    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13998    pub reset_counter: u8,
13999}
14000impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14001    pub const ENCODED_LEN: usize = 117usize;
14002    pub const DEFAULT: Self = Self {
14003        usec: 0_u64,
14004        x: 0.0_f32,
14005        y: 0.0_f32,
14006        z: 0.0_f32,
14007        roll: 0.0_f32,
14008        pitch: 0.0_f32,
14009        yaw: 0.0_f32,
14010        covariance: [0.0_f32; 21usize],
14011        reset_counter: 0_u8,
14012    };
14013    #[cfg(feature = "arbitrary")]
14014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14015        use arbitrary::{Arbitrary, Unstructured};
14016        let mut buf = [0u8; 1024];
14017        rng.fill_bytes(&mut buf);
14018        let mut unstructured = Unstructured::new(&buf);
14019        Self::arbitrary(&mut unstructured).unwrap_or_default()
14020    }
14021}
14022impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14023    fn default() -> Self {
14024        Self::DEFAULT.clone()
14025    }
14026}
14027impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
14028    type Message = MavMessage;
14029    const ID: u32 = 101u32;
14030    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
14031    const EXTRA_CRC: u8 = 102u8;
14032    const ENCODED_LEN: usize = 117usize;
14033    fn deser(
14034        _version: MavlinkVersion,
14035        __input: &[u8],
14036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14037        let avail_len = __input.len();
14038        let mut payload_buf = [0; Self::ENCODED_LEN];
14039        let mut buf = if avail_len < Self::ENCODED_LEN {
14040            payload_buf[0..avail_len].copy_from_slice(__input);
14041            Bytes::new(&payload_buf)
14042        } else {
14043            Bytes::new(__input)
14044        };
14045        let mut __struct = Self::default();
14046        __struct.usec = buf.get_u64_le();
14047        __struct.x = buf.get_f32_le();
14048        __struct.y = buf.get_f32_le();
14049        __struct.z = buf.get_f32_le();
14050        __struct.roll = buf.get_f32_le();
14051        __struct.pitch = buf.get_f32_le();
14052        __struct.yaw = buf.get_f32_le();
14053        for v in &mut __struct.covariance {
14054            let val = buf.get_f32_le();
14055            *v = val;
14056        }
14057        __struct.reset_counter = buf.get_u8();
14058        Ok(__struct)
14059    }
14060    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14061        let mut __tmp = BytesMut::new(bytes);
14062        #[allow(clippy::absurd_extreme_comparisons)]
14063        #[allow(unused_comparisons)]
14064        if __tmp.remaining() < Self::ENCODED_LEN {
14065            panic!(
14066                "buffer is too small (need {} bytes, but got {})",
14067                Self::ENCODED_LEN,
14068                __tmp.remaining(),
14069            )
14070        }
14071        __tmp.put_u64_le(self.usec);
14072        __tmp.put_f32_le(self.x);
14073        __tmp.put_f32_le(self.y);
14074        __tmp.put_f32_le(self.z);
14075        __tmp.put_f32_le(self.roll);
14076        __tmp.put_f32_le(self.pitch);
14077        __tmp.put_f32_le(self.yaw);
14078        for val in &self.covariance {
14079            __tmp.put_f32_le(*val);
14080        }
14081        __tmp.put_u8(self.reset_counter);
14082        if matches!(version, MavlinkVersion::V2) {
14083            let len = __tmp.len();
14084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14085        } else {
14086            __tmp.len()
14087        }
14088    }
14089}
14090#[doc = "Second GPS data."]
14091#[doc = ""]
14092#[doc = "ID: 124"]
14093#[derive(Debug, Clone, PartialEq)]
14094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14096pub struct GPS2_RAW_DATA {
14097    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14098    pub time_usec: u64,
14099    #[doc = "Latitude (WGS84)"]
14100    pub lat: i32,
14101    #[doc = "Longitude (WGS84)"]
14102    pub lon: i32,
14103    #[doc = "Altitude (MSL). Positive for up."]
14104    pub alt: i32,
14105    #[doc = "Age of DGPS info"]
14106    pub dgps_age: u32,
14107    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14108    pub eph: u16,
14109    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14110    pub epv: u16,
14111    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14112    pub vel: u16,
14113    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14114    pub cog: u16,
14115    #[doc = "GPS fix type."]
14116    pub fix_type: GpsFixType,
14117    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14118    pub satellites_visible: u8,
14119    #[doc = "Number of DGPS satellites"]
14120    pub dgps_numch: u8,
14121    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14122    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14123    pub yaw: u16,
14124    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14126    pub alt_ellipsoid: i32,
14127    #[doc = "Position uncertainty."]
14128    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14129    pub h_acc: u32,
14130    #[doc = "Altitude uncertainty."]
14131    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14132    pub v_acc: u32,
14133    #[doc = "Speed uncertainty."]
14134    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14135    pub vel_acc: u32,
14136    #[doc = "Heading / track uncertainty"]
14137    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14138    pub hdg_acc: u32,
14139}
14140impl GPS2_RAW_DATA {
14141    pub const ENCODED_LEN: usize = 57usize;
14142    pub const DEFAULT: Self = Self {
14143        time_usec: 0_u64,
14144        lat: 0_i32,
14145        lon: 0_i32,
14146        alt: 0_i32,
14147        dgps_age: 0_u32,
14148        eph: 0_u16,
14149        epv: 0_u16,
14150        vel: 0_u16,
14151        cog: 0_u16,
14152        fix_type: GpsFixType::DEFAULT,
14153        satellites_visible: 0_u8,
14154        dgps_numch: 0_u8,
14155        yaw: 0_u16,
14156        alt_ellipsoid: 0_i32,
14157        h_acc: 0_u32,
14158        v_acc: 0_u32,
14159        vel_acc: 0_u32,
14160        hdg_acc: 0_u32,
14161    };
14162    #[cfg(feature = "arbitrary")]
14163    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14164        use arbitrary::{Arbitrary, Unstructured};
14165        let mut buf = [0u8; 1024];
14166        rng.fill_bytes(&mut buf);
14167        let mut unstructured = Unstructured::new(&buf);
14168        Self::arbitrary(&mut unstructured).unwrap_or_default()
14169    }
14170}
14171impl Default for GPS2_RAW_DATA {
14172    fn default() -> Self {
14173        Self::DEFAULT.clone()
14174    }
14175}
14176impl MessageData for GPS2_RAW_DATA {
14177    type Message = MavMessage;
14178    const ID: u32 = 124u32;
14179    const NAME: &'static str = "GPS2_RAW";
14180    const EXTRA_CRC: u8 = 87u8;
14181    const ENCODED_LEN: usize = 57usize;
14182    fn deser(
14183        _version: MavlinkVersion,
14184        __input: &[u8],
14185    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14186        let avail_len = __input.len();
14187        let mut payload_buf = [0; Self::ENCODED_LEN];
14188        let mut buf = if avail_len < Self::ENCODED_LEN {
14189            payload_buf[0..avail_len].copy_from_slice(__input);
14190            Bytes::new(&payload_buf)
14191        } else {
14192            Bytes::new(__input)
14193        };
14194        let mut __struct = Self::default();
14195        __struct.time_usec = buf.get_u64_le();
14196        __struct.lat = buf.get_i32_le();
14197        __struct.lon = buf.get_i32_le();
14198        __struct.alt = buf.get_i32_le();
14199        __struct.dgps_age = buf.get_u32_le();
14200        __struct.eph = buf.get_u16_le();
14201        __struct.epv = buf.get_u16_le();
14202        __struct.vel = buf.get_u16_le();
14203        __struct.cog = buf.get_u16_le();
14204        let tmp = buf.get_u8();
14205        __struct.fix_type =
14206            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14207                enum_type: "GpsFixType",
14208                value: tmp as u32,
14209            })?;
14210        __struct.satellites_visible = buf.get_u8();
14211        __struct.dgps_numch = buf.get_u8();
14212        __struct.yaw = buf.get_u16_le();
14213        __struct.alt_ellipsoid = buf.get_i32_le();
14214        __struct.h_acc = buf.get_u32_le();
14215        __struct.v_acc = buf.get_u32_le();
14216        __struct.vel_acc = buf.get_u32_le();
14217        __struct.hdg_acc = buf.get_u32_le();
14218        Ok(__struct)
14219    }
14220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14221        let mut __tmp = BytesMut::new(bytes);
14222        #[allow(clippy::absurd_extreme_comparisons)]
14223        #[allow(unused_comparisons)]
14224        if __tmp.remaining() < Self::ENCODED_LEN {
14225            panic!(
14226                "buffer is too small (need {} bytes, but got {})",
14227                Self::ENCODED_LEN,
14228                __tmp.remaining(),
14229            )
14230        }
14231        __tmp.put_u64_le(self.time_usec);
14232        __tmp.put_i32_le(self.lat);
14233        __tmp.put_i32_le(self.lon);
14234        __tmp.put_i32_le(self.alt);
14235        __tmp.put_u32_le(self.dgps_age);
14236        __tmp.put_u16_le(self.eph);
14237        __tmp.put_u16_le(self.epv);
14238        __tmp.put_u16_le(self.vel);
14239        __tmp.put_u16_le(self.cog);
14240        __tmp.put_u8(self.fix_type as u8);
14241        __tmp.put_u8(self.satellites_visible);
14242        __tmp.put_u8(self.dgps_numch);
14243        __tmp.put_u16_le(self.yaw);
14244        __tmp.put_i32_le(self.alt_ellipsoid);
14245        __tmp.put_u32_le(self.h_acc);
14246        __tmp.put_u32_le(self.v_acc);
14247        __tmp.put_u32_le(self.vel_acc);
14248        __tmp.put_u32_le(self.hdg_acc);
14249        if matches!(version, MavlinkVersion::V2) {
14250            let len = __tmp.len();
14251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14252        } else {
14253            __tmp.len()
14254        }
14255    }
14256}
14257#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14258#[doc = ""]
14259#[doc = "ID: 128"]
14260#[derive(Debug, Clone, PartialEq)]
14261#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14262#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14263pub struct GPS2_RTK_DATA {
14264    #[doc = "Time since boot of last baseline message received."]
14265    pub time_last_baseline_ms: u32,
14266    #[doc = "GPS Time of Week of last baseline"]
14267    pub tow: u32,
14268    #[doc = "Current baseline in ECEF x or NED north component."]
14269    pub baseline_a_mm: i32,
14270    #[doc = "Current baseline in ECEF y or NED east component."]
14271    pub baseline_b_mm: i32,
14272    #[doc = "Current baseline in ECEF z or NED down component."]
14273    pub baseline_c_mm: i32,
14274    #[doc = "Current estimate of baseline accuracy."]
14275    pub accuracy: u32,
14276    #[doc = "Current number of integer ambiguity hypotheses."]
14277    pub iar_num_hypotheses: i32,
14278    #[doc = "GPS Week Number of last baseline"]
14279    pub wn: u16,
14280    #[doc = "Identification of connected RTK receiver."]
14281    pub rtk_receiver_id: u8,
14282    #[doc = "GPS-specific health report for RTK data."]
14283    pub rtk_health: u8,
14284    #[doc = "Rate of baseline messages being received by GPS"]
14285    pub rtk_rate: u8,
14286    #[doc = "Current number of sats used for RTK calculation."]
14287    pub nsats: u8,
14288    #[doc = "Coordinate system of baseline"]
14289    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14290}
14291impl GPS2_RTK_DATA {
14292    pub const ENCODED_LEN: usize = 35usize;
14293    pub const DEFAULT: Self = Self {
14294        time_last_baseline_ms: 0_u32,
14295        tow: 0_u32,
14296        baseline_a_mm: 0_i32,
14297        baseline_b_mm: 0_i32,
14298        baseline_c_mm: 0_i32,
14299        accuracy: 0_u32,
14300        iar_num_hypotheses: 0_i32,
14301        wn: 0_u16,
14302        rtk_receiver_id: 0_u8,
14303        rtk_health: 0_u8,
14304        rtk_rate: 0_u8,
14305        nsats: 0_u8,
14306        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14307    };
14308    #[cfg(feature = "arbitrary")]
14309    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14310        use arbitrary::{Arbitrary, Unstructured};
14311        let mut buf = [0u8; 1024];
14312        rng.fill_bytes(&mut buf);
14313        let mut unstructured = Unstructured::new(&buf);
14314        Self::arbitrary(&mut unstructured).unwrap_or_default()
14315    }
14316}
14317impl Default for GPS2_RTK_DATA {
14318    fn default() -> Self {
14319        Self::DEFAULT.clone()
14320    }
14321}
14322impl MessageData for GPS2_RTK_DATA {
14323    type Message = MavMessage;
14324    const ID: u32 = 128u32;
14325    const NAME: &'static str = "GPS2_RTK";
14326    const EXTRA_CRC: u8 = 226u8;
14327    const ENCODED_LEN: usize = 35usize;
14328    fn deser(
14329        _version: MavlinkVersion,
14330        __input: &[u8],
14331    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14332        let avail_len = __input.len();
14333        let mut payload_buf = [0; Self::ENCODED_LEN];
14334        let mut buf = if avail_len < Self::ENCODED_LEN {
14335            payload_buf[0..avail_len].copy_from_slice(__input);
14336            Bytes::new(&payload_buf)
14337        } else {
14338            Bytes::new(__input)
14339        };
14340        let mut __struct = Self::default();
14341        __struct.time_last_baseline_ms = buf.get_u32_le();
14342        __struct.tow = buf.get_u32_le();
14343        __struct.baseline_a_mm = buf.get_i32_le();
14344        __struct.baseline_b_mm = buf.get_i32_le();
14345        __struct.baseline_c_mm = buf.get_i32_le();
14346        __struct.accuracy = buf.get_u32_le();
14347        __struct.iar_num_hypotheses = buf.get_i32_le();
14348        __struct.wn = buf.get_u16_le();
14349        __struct.rtk_receiver_id = buf.get_u8();
14350        __struct.rtk_health = buf.get_u8();
14351        __struct.rtk_rate = buf.get_u8();
14352        __struct.nsats = buf.get_u8();
14353        let tmp = buf.get_u8();
14354        __struct.baseline_coords_type =
14355            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14356                enum_type: "RtkBaselineCoordinateSystem",
14357                value: tmp as u32,
14358            })?;
14359        Ok(__struct)
14360    }
14361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14362        let mut __tmp = BytesMut::new(bytes);
14363        #[allow(clippy::absurd_extreme_comparisons)]
14364        #[allow(unused_comparisons)]
14365        if __tmp.remaining() < Self::ENCODED_LEN {
14366            panic!(
14367                "buffer is too small (need {} bytes, but got {})",
14368                Self::ENCODED_LEN,
14369                __tmp.remaining(),
14370            )
14371        }
14372        __tmp.put_u32_le(self.time_last_baseline_ms);
14373        __tmp.put_u32_le(self.tow);
14374        __tmp.put_i32_le(self.baseline_a_mm);
14375        __tmp.put_i32_le(self.baseline_b_mm);
14376        __tmp.put_i32_le(self.baseline_c_mm);
14377        __tmp.put_u32_le(self.accuracy);
14378        __tmp.put_i32_le(self.iar_num_hypotheses);
14379        __tmp.put_u16_le(self.wn);
14380        __tmp.put_u8(self.rtk_receiver_id);
14381        __tmp.put_u8(self.rtk_health);
14382        __tmp.put_u8(self.rtk_rate);
14383        __tmp.put_u8(self.nsats);
14384        __tmp.put_u8(self.baseline_coords_type as u8);
14385        if matches!(version, MavlinkVersion::V2) {
14386            let len = __tmp.len();
14387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14388        } else {
14389            __tmp.len()
14390        }
14391    }
14392}
14393#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
14394#[doc = ""]
14395#[doc = "ID: 49"]
14396#[derive(Debug, Clone, PartialEq)]
14397#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14398#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14399pub struct GPS_GLOBAL_ORIGIN_DATA {
14400    #[doc = "Latitude (WGS84)"]
14401    pub latitude: i32,
14402    #[doc = "Longitude (WGS84)"]
14403    pub longitude: i32,
14404    #[doc = "Altitude (MSL). Positive for up."]
14405    pub altitude: i32,
14406    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14407    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14408    pub time_usec: u64,
14409}
14410impl GPS_GLOBAL_ORIGIN_DATA {
14411    pub const ENCODED_LEN: usize = 20usize;
14412    pub const DEFAULT: Self = Self {
14413        latitude: 0_i32,
14414        longitude: 0_i32,
14415        altitude: 0_i32,
14416        time_usec: 0_u64,
14417    };
14418    #[cfg(feature = "arbitrary")]
14419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14420        use arbitrary::{Arbitrary, Unstructured};
14421        let mut buf = [0u8; 1024];
14422        rng.fill_bytes(&mut buf);
14423        let mut unstructured = Unstructured::new(&buf);
14424        Self::arbitrary(&mut unstructured).unwrap_or_default()
14425    }
14426}
14427impl Default for GPS_GLOBAL_ORIGIN_DATA {
14428    fn default() -> Self {
14429        Self::DEFAULT.clone()
14430    }
14431}
14432impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
14433    type Message = MavMessage;
14434    const ID: u32 = 49u32;
14435    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
14436    const EXTRA_CRC: u8 = 39u8;
14437    const ENCODED_LEN: usize = 20usize;
14438    fn deser(
14439        _version: MavlinkVersion,
14440        __input: &[u8],
14441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14442        let avail_len = __input.len();
14443        let mut payload_buf = [0; Self::ENCODED_LEN];
14444        let mut buf = if avail_len < Self::ENCODED_LEN {
14445            payload_buf[0..avail_len].copy_from_slice(__input);
14446            Bytes::new(&payload_buf)
14447        } else {
14448            Bytes::new(__input)
14449        };
14450        let mut __struct = Self::default();
14451        __struct.latitude = buf.get_i32_le();
14452        __struct.longitude = buf.get_i32_le();
14453        __struct.altitude = buf.get_i32_le();
14454        __struct.time_usec = buf.get_u64_le();
14455        Ok(__struct)
14456    }
14457    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14458        let mut __tmp = BytesMut::new(bytes);
14459        #[allow(clippy::absurd_extreme_comparisons)]
14460        #[allow(unused_comparisons)]
14461        if __tmp.remaining() < Self::ENCODED_LEN {
14462            panic!(
14463                "buffer is too small (need {} bytes, but got {})",
14464                Self::ENCODED_LEN,
14465                __tmp.remaining(),
14466            )
14467        }
14468        __tmp.put_i32_le(self.latitude);
14469        __tmp.put_i32_le(self.longitude);
14470        __tmp.put_i32_le(self.altitude);
14471        __tmp.put_u64_le(self.time_usec);
14472        if matches!(version, MavlinkVersion::V2) {
14473            let len = __tmp.len();
14474            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14475        } else {
14476            __tmp.len()
14477        }
14478    }
14479}
14480#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
14481#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
14482#[doc = ""]
14483#[doc = "ID: 123"]
14484#[derive(Debug, Clone, PartialEq)]
14485#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14486#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14487pub struct GPS_INJECT_DATA_DATA {
14488    #[doc = "System ID"]
14489    pub target_system: u8,
14490    #[doc = "Component ID"]
14491    pub target_component: u8,
14492    #[doc = "Data length"]
14493    pub len: u8,
14494    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
14495    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14496    pub data: [u8; 110],
14497}
14498impl GPS_INJECT_DATA_DATA {
14499    pub const ENCODED_LEN: usize = 113usize;
14500    pub const DEFAULT: Self = Self {
14501        target_system: 0_u8,
14502        target_component: 0_u8,
14503        len: 0_u8,
14504        data: [0_u8; 110usize],
14505    };
14506    #[cfg(feature = "arbitrary")]
14507    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14508        use arbitrary::{Arbitrary, Unstructured};
14509        let mut buf = [0u8; 1024];
14510        rng.fill_bytes(&mut buf);
14511        let mut unstructured = Unstructured::new(&buf);
14512        Self::arbitrary(&mut unstructured).unwrap_or_default()
14513    }
14514}
14515impl Default for GPS_INJECT_DATA_DATA {
14516    fn default() -> Self {
14517        Self::DEFAULT.clone()
14518    }
14519}
14520impl MessageData for GPS_INJECT_DATA_DATA {
14521    type Message = MavMessage;
14522    const ID: u32 = 123u32;
14523    const NAME: &'static str = "GPS_INJECT_DATA";
14524    const EXTRA_CRC: u8 = 250u8;
14525    const ENCODED_LEN: usize = 113usize;
14526    fn deser(
14527        _version: MavlinkVersion,
14528        __input: &[u8],
14529    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14530        let avail_len = __input.len();
14531        let mut payload_buf = [0; Self::ENCODED_LEN];
14532        let mut buf = if avail_len < Self::ENCODED_LEN {
14533            payload_buf[0..avail_len].copy_from_slice(__input);
14534            Bytes::new(&payload_buf)
14535        } else {
14536            Bytes::new(__input)
14537        };
14538        let mut __struct = Self::default();
14539        __struct.target_system = buf.get_u8();
14540        __struct.target_component = buf.get_u8();
14541        __struct.len = buf.get_u8();
14542        for v in &mut __struct.data {
14543            let val = buf.get_u8();
14544            *v = val;
14545        }
14546        Ok(__struct)
14547    }
14548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14549        let mut __tmp = BytesMut::new(bytes);
14550        #[allow(clippy::absurd_extreme_comparisons)]
14551        #[allow(unused_comparisons)]
14552        if __tmp.remaining() < Self::ENCODED_LEN {
14553            panic!(
14554                "buffer is too small (need {} bytes, but got {})",
14555                Self::ENCODED_LEN,
14556                __tmp.remaining(),
14557            )
14558        }
14559        __tmp.put_u8(self.target_system);
14560        __tmp.put_u8(self.target_component);
14561        __tmp.put_u8(self.len);
14562        for val in &self.data {
14563            __tmp.put_u8(*val);
14564        }
14565        if matches!(version, MavlinkVersion::V2) {
14566            let len = __tmp.len();
14567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14568        } else {
14569            __tmp.len()
14570        }
14571    }
14572}
14573#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
14574#[doc = ""]
14575#[doc = "ID: 232"]
14576#[derive(Debug, Clone, PartialEq)]
14577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14579pub struct GPS_INPUT_DATA {
14580    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14581    pub time_usec: u64,
14582    #[doc = "GPS time (from start of GPS week)"]
14583    pub time_week_ms: u32,
14584    #[doc = "Latitude (WGS84)"]
14585    pub lat: i32,
14586    #[doc = "Longitude (WGS84)"]
14587    pub lon: i32,
14588    #[doc = "Altitude (MSL). Positive for up."]
14589    pub alt: f32,
14590    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14591    pub hdop: f32,
14592    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
14593    pub vdop: f32,
14594    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
14595    pub vn: f32,
14596    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
14597    pub ve: f32,
14598    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
14599    pub vd: f32,
14600    #[doc = "GPS speed accuracy"]
14601    pub speed_accuracy: f32,
14602    #[doc = "GPS horizontal accuracy"]
14603    pub horiz_accuracy: f32,
14604    #[doc = "GPS vertical accuracy"]
14605    pub vert_accuracy: f32,
14606    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
14607    pub ignore_flags: GpsInputIgnoreFlags,
14608    #[doc = "GPS week number"]
14609    pub time_week: u16,
14610    #[doc = "ID of the GPS for multiple GPS inputs"]
14611    pub gps_id: u8,
14612    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
14613    pub fix_type: u8,
14614    #[doc = "Number of satellites visible."]
14615    pub satellites_visible: u8,
14616    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
14617    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14618    pub yaw: u16,
14619}
14620impl GPS_INPUT_DATA {
14621    pub const ENCODED_LEN: usize = 65usize;
14622    pub const DEFAULT: Self = Self {
14623        time_usec: 0_u64,
14624        time_week_ms: 0_u32,
14625        lat: 0_i32,
14626        lon: 0_i32,
14627        alt: 0.0_f32,
14628        hdop: 0.0_f32,
14629        vdop: 0.0_f32,
14630        vn: 0.0_f32,
14631        ve: 0.0_f32,
14632        vd: 0.0_f32,
14633        speed_accuracy: 0.0_f32,
14634        horiz_accuracy: 0.0_f32,
14635        vert_accuracy: 0.0_f32,
14636        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
14637        time_week: 0_u16,
14638        gps_id: 0_u8,
14639        fix_type: 0_u8,
14640        satellites_visible: 0_u8,
14641        yaw: 0_u16,
14642    };
14643    #[cfg(feature = "arbitrary")]
14644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14645        use arbitrary::{Arbitrary, Unstructured};
14646        let mut buf = [0u8; 1024];
14647        rng.fill_bytes(&mut buf);
14648        let mut unstructured = Unstructured::new(&buf);
14649        Self::arbitrary(&mut unstructured).unwrap_or_default()
14650    }
14651}
14652impl Default for GPS_INPUT_DATA {
14653    fn default() -> Self {
14654        Self::DEFAULT.clone()
14655    }
14656}
14657impl MessageData for GPS_INPUT_DATA {
14658    type Message = MavMessage;
14659    const ID: u32 = 232u32;
14660    const NAME: &'static str = "GPS_INPUT";
14661    const EXTRA_CRC: u8 = 151u8;
14662    const ENCODED_LEN: usize = 65usize;
14663    fn deser(
14664        _version: MavlinkVersion,
14665        __input: &[u8],
14666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14667        let avail_len = __input.len();
14668        let mut payload_buf = [0; Self::ENCODED_LEN];
14669        let mut buf = if avail_len < Self::ENCODED_LEN {
14670            payload_buf[0..avail_len].copy_from_slice(__input);
14671            Bytes::new(&payload_buf)
14672        } else {
14673            Bytes::new(__input)
14674        };
14675        let mut __struct = Self::default();
14676        __struct.time_usec = buf.get_u64_le();
14677        __struct.time_week_ms = buf.get_u32_le();
14678        __struct.lat = buf.get_i32_le();
14679        __struct.lon = buf.get_i32_le();
14680        __struct.alt = buf.get_f32_le();
14681        __struct.hdop = buf.get_f32_le();
14682        __struct.vdop = buf.get_f32_le();
14683        __struct.vn = buf.get_f32_le();
14684        __struct.ve = buf.get_f32_le();
14685        __struct.vd = buf.get_f32_le();
14686        __struct.speed_accuracy = buf.get_f32_le();
14687        __struct.horiz_accuracy = buf.get_f32_le();
14688        __struct.vert_accuracy = buf.get_f32_le();
14689        let tmp = buf.get_u16_le();
14690        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
14691            tmp & GpsInputIgnoreFlags::all().bits(),
14692        )
14693        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14694            flag_type: "GpsInputIgnoreFlags",
14695            value: tmp as u32,
14696        })?;
14697        __struct.time_week = buf.get_u16_le();
14698        __struct.gps_id = buf.get_u8();
14699        __struct.fix_type = buf.get_u8();
14700        __struct.satellites_visible = buf.get_u8();
14701        __struct.yaw = buf.get_u16_le();
14702        Ok(__struct)
14703    }
14704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14705        let mut __tmp = BytesMut::new(bytes);
14706        #[allow(clippy::absurd_extreme_comparisons)]
14707        #[allow(unused_comparisons)]
14708        if __tmp.remaining() < Self::ENCODED_LEN {
14709            panic!(
14710                "buffer is too small (need {} bytes, but got {})",
14711                Self::ENCODED_LEN,
14712                __tmp.remaining(),
14713            )
14714        }
14715        __tmp.put_u64_le(self.time_usec);
14716        __tmp.put_u32_le(self.time_week_ms);
14717        __tmp.put_i32_le(self.lat);
14718        __tmp.put_i32_le(self.lon);
14719        __tmp.put_f32_le(self.alt);
14720        __tmp.put_f32_le(self.hdop);
14721        __tmp.put_f32_le(self.vdop);
14722        __tmp.put_f32_le(self.vn);
14723        __tmp.put_f32_le(self.ve);
14724        __tmp.put_f32_le(self.vd);
14725        __tmp.put_f32_le(self.speed_accuracy);
14726        __tmp.put_f32_le(self.horiz_accuracy);
14727        __tmp.put_f32_le(self.vert_accuracy);
14728        __tmp.put_u16_le(self.ignore_flags.bits());
14729        __tmp.put_u16_le(self.time_week);
14730        __tmp.put_u8(self.gps_id);
14731        __tmp.put_u8(self.fix_type);
14732        __tmp.put_u8(self.satellites_visible);
14733        __tmp.put_u16_le(self.yaw);
14734        if matches!(version, MavlinkVersion::V2) {
14735            let len = __tmp.len();
14736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14737        } else {
14738            __tmp.len()
14739        }
14740    }
14741}
14742#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
14743#[doc = ""]
14744#[doc = "ID: 24"]
14745#[derive(Debug, Clone, PartialEq)]
14746#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14747#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14748pub struct GPS_RAW_INT_DATA {
14749    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14750    pub time_usec: u64,
14751    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
14752    pub lat: i32,
14753    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
14754    pub lon: i32,
14755    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
14756    pub alt: i32,
14757    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14758    pub eph: u16,
14759    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
14760    pub epv: u16,
14761    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
14762    pub vel: u16,
14763    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
14764    pub cog: u16,
14765    #[doc = "GPS fix type."]
14766    pub fix_type: GpsFixType,
14767    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14768    pub satellites_visible: u8,
14769    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
14770    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14771    pub alt_ellipsoid: i32,
14772    #[doc = "Position uncertainty."]
14773    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14774    pub h_acc: u32,
14775    #[doc = "Altitude uncertainty."]
14776    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14777    pub v_acc: u32,
14778    #[doc = "Speed uncertainty."]
14779    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14780    pub vel_acc: u32,
14781    #[doc = "Heading / track uncertainty"]
14782    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14783    pub hdg_acc: u32,
14784    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
14785    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14786    pub yaw: u16,
14787}
14788impl GPS_RAW_INT_DATA {
14789    pub const ENCODED_LEN: usize = 52usize;
14790    pub const DEFAULT: Self = Self {
14791        time_usec: 0_u64,
14792        lat: 0_i32,
14793        lon: 0_i32,
14794        alt: 0_i32,
14795        eph: 0_u16,
14796        epv: 0_u16,
14797        vel: 0_u16,
14798        cog: 0_u16,
14799        fix_type: GpsFixType::DEFAULT,
14800        satellites_visible: 0_u8,
14801        alt_ellipsoid: 0_i32,
14802        h_acc: 0_u32,
14803        v_acc: 0_u32,
14804        vel_acc: 0_u32,
14805        hdg_acc: 0_u32,
14806        yaw: 0_u16,
14807    };
14808    #[cfg(feature = "arbitrary")]
14809    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14810        use arbitrary::{Arbitrary, Unstructured};
14811        let mut buf = [0u8; 1024];
14812        rng.fill_bytes(&mut buf);
14813        let mut unstructured = Unstructured::new(&buf);
14814        Self::arbitrary(&mut unstructured).unwrap_or_default()
14815    }
14816}
14817impl Default for GPS_RAW_INT_DATA {
14818    fn default() -> Self {
14819        Self::DEFAULT.clone()
14820    }
14821}
14822impl MessageData for GPS_RAW_INT_DATA {
14823    type Message = MavMessage;
14824    const ID: u32 = 24u32;
14825    const NAME: &'static str = "GPS_RAW_INT";
14826    const EXTRA_CRC: u8 = 24u8;
14827    const ENCODED_LEN: usize = 52usize;
14828    fn deser(
14829        _version: MavlinkVersion,
14830        __input: &[u8],
14831    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14832        let avail_len = __input.len();
14833        let mut payload_buf = [0; Self::ENCODED_LEN];
14834        let mut buf = if avail_len < Self::ENCODED_LEN {
14835            payload_buf[0..avail_len].copy_from_slice(__input);
14836            Bytes::new(&payload_buf)
14837        } else {
14838            Bytes::new(__input)
14839        };
14840        let mut __struct = Self::default();
14841        __struct.time_usec = buf.get_u64_le();
14842        __struct.lat = buf.get_i32_le();
14843        __struct.lon = buf.get_i32_le();
14844        __struct.alt = buf.get_i32_le();
14845        __struct.eph = buf.get_u16_le();
14846        __struct.epv = buf.get_u16_le();
14847        __struct.vel = buf.get_u16_le();
14848        __struct.cog = buf.get_u16_le();
14849        let tmp = buf.get_u8();
14850        __struct.fix_type =
14851            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14852                enum_type: "GpsFixType",
14853                value: tmp as u32,
14854            })?;
14855        __struct.satellites_visible = buf.get_u8();
14856        __struct.alt_ellipsoid = buf.get_i32_le();
14857        __struct.h_acc = buf.get_u32_le();
14858        __struct.v_acc = buf.get_u32_le();
14859        __struct.vel_acc = buf.get_u32_le();
14860        __struct.hdg_acc = buf.get_u32_le();
14861        __struct.yaw = buf.get_u16_le();
14862        Ok(__struct)
14863    }
14864    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14865        let mut __tmp = BytesMut::new(bytes);
14866        #[allow(clippy::absurd_extreme_comparisons)]
14867        #[allow(unused_comparisons)]
14868        if __tmp.remaining() < Self::ENCODED_LEN {
14869            panic!(
14870                "buffer is too small (need {} bytes, but got {})",
14871                Self::ENCODED_LEN,
14872                __tmp.remaining(),
14873            )
14874        }
14875        __tmp.put_u64_le(self.time_usec);
14876        __tmp.put_i32_le(self.lat);
14877        __tmp.put_i32_le(self.lon);
14878        __tmp.put_i32_le(self.alt);
14879        __tmp.put_u16_le(self.eph);
14880        __tmp.put_u16_le(self.epv);
14881        __tmp.put_u16_le(self.vel);
14882        __tmp.put_u16_le(self.cog);
14883        __tmp.put_u8(self.fix_type as u8);
14884        __tmp.put_u8(self.satellites_visible);
14885        __tmp.put_i32_le(self.alt_ellipsoid);
14886        __tmp.put_u32_le(self.h_acc);
14887        __tmp.put_u32_le(self.v_acc);
14888        __tmp.put_u32_le(self.vel_acc);
14889        __tmp.put_u32_le(self.hdg_acc);
14890        __tmp.put_u16_le(self.yaw);
14891        if matches!(version, MavlinkVersion::V2) {
14892            let len = __tmp.len();
14893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14894        } else {
14895            __tmp.len()
14896        }
14897    }
14898}
14899#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14900#[doc = ""]
14901#[doc = "ID: 233"]
14902#[derive(Debug, Clone, PartialEq)]
14903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14905pub struct GPS_RTCM_DATA_DATA {
14906    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14907    pub flags: u8,
14908    #[doc = "data length"]
14909    pub len: u8,
14910    #[doc = "RTCM message (may be fragmented)"]
14911    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14912    pub data: [u8; 180],
14913}
14914impl GPS_RTCM_DATA_DATA {
14915    pub const ENCODED_LEN: usize = 182usize;
14916    pub const DEFAULT: Self = Self {
14917        flags: 0_u8,
14918        len: 0_u8,
14919        data: [0_u8; 180usize],
14920    };
14921    #[cfg(feature = "arbitrary")]
14922    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14923        use arbitrary::{Arbitrary, Unstructured};
14924        let mut buf = [0u8; 1024];
14925        rng.fill_bytes(&mut buf);
14926        let mut unstructured = Unstructured::new(&buf);
14927        Self::arbitrary(&mut unstructured).unwrap_or_default()
14928    }
14929}
14930impl Default for GPS_RTCM_DATA_DATA {
14931    fn default() -> Self {
14932        Self::DEFAULT.clone()
14933    }
14934}
14935impl MessageData for GPS_RTCM_DATA_DATA {
14936    type Message = MavMessage;
14937    const ID: u32 = 233u32;
14938    const NAME: &'static str = "GPS_RTCM_DATA";
14939    const EXTRA_CRC: u8 = 35u8;
14940    const ENCODED_LEN: usize = 182usize;
14941    fn deser(
14942        _version: MavlinkVersion,
14943        __input: &[u8],
14944    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14945        let avail_len = __input.len();
14946        let mut payload_buf = [0; Self::ENCODED_LEN];
14947        let mut buf = if avail_len < Self::ENCODED_LEN {
14948            payload_buf[0..avail_len].copy_from_slice(__input);
14949            Bytes::new(&payload_buf)
14950        } else {
14951            Bytes::new(__input)
14952        };
14953        let mut __struct = Self::default();
14954        __struct.flags = buf.get_u8();
14955        __struct.len = buf.get_u8();
14956        for v in &mut __struct.data {
14957            let val = buf.get_u8();
14958            *v = val;
14959        }
14960        Ok(__struct)
14961    }
14962    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14963        let mut __tmp = BytesMut::new(bytes);
14964        #[allow(clippy::absurd_extreme_comparisons)]
14965        #[allow(unused_comparisons)]
14966        if __tmp.remaining() < Self::ENCODED_LEN {
14967            panic!(
14968                "buffer is too small (need {} bytes, but got {})",
14969                Self::ENCODED_LEN,
14970                __tmp.remaining(),
14971            )
14972        }
14973        __tmp.put_u8(self.flags);
14974        __tmp.put_u8(self.len);
14975        for val in &self.data {
14976            __tmp.put_u8(*val);
14977        }
14978        if matches!(version, MavlinkVersion::V2) {
14979            let len = __tmp.len();
14980            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14981        } else {
14982            __tmp.len()
14983        }
14984    }
14985}
14986#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14987#[doc = ""]
14988#[doc = "ID: 127"]
14989#[derive(Debug, Clone, PartialEq)]
14990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14992pub struct GPS_RTK_DATA {
14993    #[doc = "Time since boot of last baseline message received."]
14994    pub time_last_baseline_ms: u32,
14995    #[doc = "GPS Time of Week of last baseline"]
14996    pub tow: u32,
14997    #[doc = "Current baseline in ECEF x or NED north component."]
14998    pub baseline_a_mm: i32,
14999    #[doc = "Current baseline in ECEF y or NED east component."]
15000    pub baseline_b_mm: i32,
15001    #[doc = "Current baseline in ECEF z or NED down component."]
15002    pub baseline_c_mm: i32,
15003    #[doc = "Current estimate of baseline accuracy."]
15004    pub accuracy: u32,
15005    #[doc = "Current number of integer ambiguity hypotheses."]
15006    pub iar_num_hypotheses: i32,
15007    #[doc = "GPS Week Number of last baseline"]
15008    pub wn: u16,
15009    #[doc = "Identification of connected RTK receiver."]
15010    pub rtk_receiver_id: u8,
15011    #[doc = "GPS-specific health report for RTK data."]
15012    pub rtk_health: u8,
15013    #[doc = "Rate of baseline messages being received by GPS"]
15014    pub rtk_rate: u8,
15015    #[doc = "Current number of sats used for RTK calculation."]
15016    pub nsats: u8,
15017    #[doc = "Coordinate system of baseline"]
15018    pub baseline_coords_type: RtkBaselineCoordinateSystem,
15019}
15020impl GPS_RTK_DATA {
15021    pub const ENCODED_LEN: usize = 35usize;
15022    pub const DEFAULT: Self = Self {
15023        time_last_baseline_ms: 0_u32,
15024        tow: 0_u32,
15025        baseline_a_mm: 0_i32,
15026        baseline_b_mm: 0_i32,
15027        baseline_c_mm: 0_i32,
15028        accuracy: 0_u32,
15029        iar_num_hypotheses: 0_i32,
15030        wn: 0_u16,
15031        rtk_receiver_id: 0_u8,
15032        rtk_health: 0_u8,
15033        rtk_rate: 0_u8,
15034        nsats: 0_u8,
15035        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
15036    };
15037    #[cfg(feature = "arbitrary")]
15038    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15039        use arbitrary::{Arbitrary, Unstructured};
15040        let mut buf = [0u8; 1024];
15041        rng.fill_bytes(&mut buf);
15042        let mut unstructured = Unstructured::new(&buf);
15043        Self::arbitrary(&mut unstructured).unwrap_or_default()
15044    }
15045}
15046impl Default for GPS_RTK_DATA {
15047    fn default() -> Self {
15048        Self::DEFAULT.clone()
15049    }
15050}
15051impl MessageData for GPS_RTK_DATA {
15052    type Message = MavMessage;
15053    const ID: u32 = 127u32;
15054    const NAME: &'static str = "GPS_RTK";
15055    const EXTRA_CRC: u8 = 25u8;
15056    const ENCODED_LEN: usize = 35usize;
15057    fn deser(
15058        _version: MavlinkVersion,
15059        __input: &[u8],
15060    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15061        let avail_len = __input.len();
15062        let mut payload_buf = [0; Self::ENCODED_LEN];
15063        let mut buf = if avail_len < Self::ENCODED_LEN {
15064            payload_buf[0..avail_len].copy_from_slice(__input);
15065            Bytes::new(&payload_buf)
15066        } else {
15067            Bytes::new(__input)
15068        };
15069        let mut __struct = Self::default();
15070        __struct.time_last_baseline_ms = buf.get_u32_le();
15071        __struct.tow = buf.get_u32_le();
15072        __struct.baseline_a_mm = buf.get_i32_le();
15073        __struct.baseline_b_mm = buf.get_i32_le();
15074        __struct.baseline_c_mm = buf.get_i32_le();
15075        __struct.accuracy = buf.get_u32_le();
15076        __struct.iar_num_hypotheses = buf.get_i32_le();
15077        __struct.wn = buf.get_u16_le();
15078        __struct.rtk_receiver_id = buf.get_u8();
15079        __struct.rtk_health = buf.get_u8();
15080        __struct.rtk_rate = buf.get_u8();
15081        __struct.nsats = buf.get_u8();
15082        let tmp = buf.get_u8();
15083        __struct.baseline_coords_type =
15084            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15085                enum_type: "RtkBaselineCoordinateSystem",
15086                value: tmp as u32,
15087            })?;
15088        Ok(__struct)
15089    }
15090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15091        let mut __tmp = BytesMut::new(bytes);
15092        #[allow(clippy::absurd_extreme_comparisons)]
15093        #[allow(unused_comparisons)]
15094        if __tmp.remaining() < Self::ENCODED_LEN {
15095            panic!(
15096                "buffer is too small (need {} bytes, but got {})",
15097                Self::ENCODED_LEN,
15098                __tmp.remaining(),
15099            )
15100        }
15101        __tmp.put_u32_le(self.time_last_baseline_ms);
15102        __tmp.put_u32_le(self.tow);
15103        __tmp.put_i32_le(self.baseline_a_mm);
15104        __tmp.put_i32_le(self.baseline_b_mm);
15105        __tmp.put_i32_le(self.baseline_c_mm);
15106        __tmp.put_u32_le(self.accuracy);
15107        __tmp.put_i32_le(self.iar_num_hypotheses);
15108        __tmp.put_u16_le(self.wn);
15109        __tmp.put_u8(self.rtk_receiver_id);
15110        __tmp.put_u8(self.rtk_health);
15111        __tmp.put_u8(self.rtk_rate);
15112        __tmp.put_u8(self.nsats);
15113        __tmp.put_u8(self.baseline_coords_type as u8);
15114        if matches!(version, MavlinkVersion::V2) {
15115            let len = __tmp.len();
15116            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15117        } else {
15118            __tmp.len()
15119        }
15120    }
15121}
15122#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
15123#[doc = ""]
15124#[doc = "ID: 25"]
15125#[derive(Debug, Clone, PartialEq)]
15126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15128pub struct GPS_STATUS_DATA {
15129    #[doc = "Number of satellites visible"]
15130    pub satellites_visible: u8,
15131    #[doc = "Global satellite ID"]
15132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15133    pub satellite_prn: [u8; 20],
15134    #[doc = "0: Satellite not used, 1: used for localization"]
15135    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15136    pub satellite_used: [u8; 20],
15137    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
15138    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15139    pub satellite_elevation: [u8; 20],
15140    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
15141    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15142    pub satellite_azimuth: [u8; 20],
15143    #[doc = "Signal to noise ratio of satellite"]
15144    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15145    pub satellite_snr: [u8; 20],
15146}
15147impl GPS_STATUS_DATA {
15148    pub const ENCODED_LEN: usize = 101usize;
15149    pub const DEFAULT: Self = Self {
15150        satellites_visible: 0_u8,
15151        satellite_prn: [0_u8; 20usize],
15152        satellite_used: [0_u8; 20usize],
15153        satellite_elevation: [0_u8; 20usize],
15154        satellite_azimuth: [0_u8; 20usize],
15155        satellite_snr: [0_u8; 20usize],
15156    };
15157    #[cfg(feature = "arbitrary")]
15158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15159        use arbitrary::{Arbitrary, Unstructured};
15160        let mut buf = [0u8; 1024];
15161        rng.fill_bytes(&mut buf);
15162        let mut unstructured = Unstructured::new(&buf);
15163        Self::arbitrary(&mut unstructured).unwrap_or_default()
15164    }
15165}
15166impl Default for GPS_STATUS_DATA {
15167    fn default() -> Self {
15168        Self::DEFAULT.clone()
15169    }
15170}
15171impl MessageData for GPS_STATUS_DATA {
15172    type Message = MavMessage;
15173    const ID: u32 = 25u32;
15174    const NAME: &'static str = "GPS_STATUS";
15175    const EXTRA_CRC: u8 = 23u8;
15176    const ENCODED_LEN: usize = 101usize;
15177    fn deser(
15178        _version: MavlinkVersion,
15179        __input: &[u8],
15180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15181        let avail_len = __input.len();
15182        let mut payload_buf = [0; Self::ENCODED_LEN];
15183        let mut buf = if avail_len < Self::ENCODED_LEN {
15184            payload_buf[0..avail_len].copy_from_slice(__input);
15185            Bytes::new(&payload_buf)
15186        } else {
15187            Bytes::new(__input)
15188        };
15189        let mut __struct = Self::default();
15190        __struct.satellites_visible = buf.get_u8();
15191        for v in &mut __struct.satellite_prn {
15192            let val = buf.get_u8();
15193            *v = val;
15194        }
15195        for v in &mut __struct.satellite_used {
15196            let val = buf.get_u8();
15197            *v = val;
15198        }
15199        for v in &mut __struct.satellite_elevation {
15200            let val = buf.get_u8();
15201            *v = val;
15202        }
15203        for v in &mut __struct.satellite_azimuth {
15204            let val = buf.get_u8();
15205            *v = val;
15206        }
15207        for v in &mut __struct.satellite_snr {
15208            let val = buf.get_u8();
15209            *v = val;
15210        }
15211        Ok(__struct)
15212    }
15213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15214        let mut __tmp = BytesMut::new(bytes);
15215        #[allow(clippy::absurd_extreme_comparisons)]
15216        #[allow(unused_comparisons)]
15217        if __tmp.remaining() < Self::ENCODED_LEN {
15218            panic!(
15219                "buffer is too small (need {} bytes, but got {})",
15220                Self::ENCODED_LEN,
15221                __tmp.remaining(),
15222            )
15223        }
15224        __tmp.put_u8(self.satellites_visible);
15225        for val in &self.satellite_prn {
15226            __tmp.put_u8(*val);
15227        }
15228        for val in &self.satellite_used {
15229            __tmp.put_u8(*val);
15230        }
15231        for val in &self.satellite_elevation {
15232            __tmp.put_u8(*val);
15233        }
15234        for val in &self.satellite_azimuth {
15235            __tmp.put_u8(*val);
15236        }
15237        for val in &self.satellite_snr {
15238            __tmp.put_u8(*val);
15239        }
15240        if matches!(version, MavlinkVersion::V2) {
15241            let len = __tmp.len();
15242            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15243        } else {
15244            __tmp.len()
15245        }
15246    }
15247}
15248#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
15249#[doc = ""]
15250#[doc = "ID: 0"]
15251#[derive(Debug, Clone, PartialEq)]
15252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15253#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15254pub struct HEARTBEAT_DATA {
15255    #[doc = "A bitfield for use for autopilot-specific flags"]
15256    pub custom_mode: u32,
15257    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
15258    pub mavtype: MavType,
15259    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15260    pub autopilot: MavAutopilot,
15261    #[doc = "System mode bitmap."]
15262    pub base_mode: MavModeFlag,
15263    #[doc = "System status flag."]
15264    pub system_status: MavState,
15265    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
15266    pub mavlink_version: u8,
15267}
15268impl HEARTBEAT_DATA {
15269    pub const ENCODED_LEN: usize = 9usize;
15270    pub const DEFAULT: Self = Self {
15271        custom_mode: 0_u32,
15272        mavtype: MavType::DEFAULT,
15273        autopilot: MavAutopilot::DEFAULT,
15274        base_mode: MavModeFlag::DEFAULT,
15275        system_status: MavState::DEFAULT,
15276        mavlink_version: MINOR_MAVLINK_VERSION,
15277    };
15278    #[cfg(feature = "arbitrary")]
15279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15280        use arbitrary::{Arbitrary, Unstructured};
15281        let mut buf = [0u8; 1024];
15282        rng.fill_bytes(&mut buf);
15283        let mut unstructured = Unstructured::new(&buf);
15284        Self::arbitrary(&mut unstructured).unwrap_or_default()
15285    }
15286}
15287impl Default for HEARTBEAT_DATA {
15288    fn default() -> Self {
15289        Self::DEFAULT.clone()
15290    }
15291}
15292impl MessageData for HEARTBEAT_DATA {
15293    type Message = MavMessage;
15294    const ID: u32 = 0u32;
15295    const NAME: &'static str = "HEARTBEAT";
15296    const EXTRA_CRC: u8 = 50u8;
15297    const ENCODED_LEN: usize = 9usize;
15298    fn deser(
15299        _version: MavlinkVersion,
15300        __input: &[u8],
15301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15302        let avail_len = __input.len();
15303        let mut payload_buf = [0; Self::ENCODED_LEN];
15304        let mut buf = if avail_len < Self::ENCODED_LEN {
15305            payload_buf[0..avail_len].copy_from_slice(__input);
15306            Bytes::new(&payload_buf)
15307        } else {
15308            Bytes::new(__input)
15309        };
15310        let mut __struct = Self::default();
15311        __struct.custom_mode = buf.get_u32_le();
15312        let tmp = buf.get_u8();
15313        __struct.mavtype =
15314            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15315                enum_type: "MavType",
15316                value: tmp as u32,
15317            })?;
15318        let tmp = buf.get_u8();
15319        __struct.autopilot =
15320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15321                enum_type: "MavAutopilot",
15322                value: tmp as u32,
15323            })?;
15324        let tmp = buf.get_u8();
15325        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15326            ::mavlink_core::error::ParserError::InvalidFlag {
15327                flag_type: "MavModeFlag",
15328                value: tmp as u32,
15329            },
15330        )?;
15331        let tmp = buf.get_u8();
15332        __struct.system_status =
15333            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15334                enum_type: "MavState",
15335                value: tmp as u32,
15336            })?;
15337        __struct.mavlink_version = buf.get_u8();
15338        Ok(__struct)
15339    }
15340    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15341        let mut __tmp = BytesMut::new(bytes);
15342        #[allow(clippy::absurd_extreme_comparisons)]
15343        #[allow(unused_comparisons)]
15344        if __tmp.remaining() < Self::ENCODED_LEN {
15345            panic!(
15346                "buffer is too small (need {} bytes, but got {})",
15347                Self::ENCODED_LEN,
15348                __tmp.remaining(),
15349            )
15350        }
15351        __tmp.put_u32_le(self.custom_mode);
15352        __tmp.put_u8(self.mavtype as u8);
15353        __tmp.put_u8(self.autopilot as u8);
15354        __tmp.put_u8(self.base_mode.bits());
15355        __tmp.put_u8(self.system_status as u8);
15356        __tmp.put_u8(self.mavlink_version);
15357        if matches!(version, MavlinkVersion::V2) {
15358            let len = __tmp.len();
15359            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15360        } else {
15361            __tmp.len()
15362        }
15363    }
15364}
15365#[doc = "The IMU readings in SI units in NED body frame."]
15366#[doc = ""]
15367#[doc = "ID: 105"]
15368#[derive(Debug, Clone, PartialEq)]
15369#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15371pub struct HIGHRES_IMU_DATA {
15372    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15373    pub time_usec: u64,
15374    #[doc = "X acceleration"]
15375    pub xacc: f32,
15376    #[doc = "Y acceleration"]
15377    pub yacc: f32,
15378    #[doc = "Z acceleration"]
15379    pub zacc: f32,
15380    #[doc = "Angular speed around X axis"]
15381    pub xgyro: f32,
15382    #[doc = "Angular speed around Y axis"]
15383    pub ygyro: f32,
15384    #[doc = "Angular speed around Z axis"]
15385    pub zgyro: f32,
15386    #[doc = "X Magnetic field"]
15387    pub xmag: f32,
15388    #[doc = "Y Magnetic field"]
15389    pub ymag: f32,
15390    #[doc = "Z Magnetic field"]
15391    pub zmag: f32,
15392    #[doc = "Absolute pressure"]
15393    pub abs_pressure: f32,
15394    #[doc = "Differential pressure"]
15395    pub diff_pressure: f32,
15396    #[doc = "Altitude calculated from pressure"]
15397    pub pressure_alt: f32,
15398    #[doc = "Temperature"]
15399    pub temperature: f32,
15400    #[doc = "Bitmap for fields that have updated since last message"]
15401    pub fields_updated: HighresImuUpdatedFlags,
15402    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
15403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15404    pub id: u8,
15405}
15406impl HIGHRES_IMU_DATA {
15407    pub const ENCODED_LEN: usize = 63usize;
15408    pub const DEFAULT: Self = Self {
15409        time_usec: 0_u64,
15410        xacc: 0.0_f32,
15411        yacc: 0.0_f32,
15412        zacc: 0.0_f32,
15413        xgyro: 0.0_f32,
15414        ygyro: 0.0_f32,
15415        zgyro: 0.0_f32,
15416        xmag: 0.0_f32,
15417        ymag: 0.0_f32,
15418        zmag: 0.0_f32,
15419        abs_pressure: 0.0_f32,
15420        diff_pressure: 0.0_f32,
15421        pressure_alt: 0.0_f32,
15422        temperature: 0.0_f32,
15423        fields_updated: HighresImuUpdatedFlags::DEFAULT,
15424        id: 0_u8,
15425    };
15426    #[cfg(feature = "arbitrary")]
15427    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15428        use arbitrary::{Arbitrary, Unstructured};
15429        let mut buf = [0u8; 1024];
15430        rng.fill_bytes(&mut buf);
15431        let mut unstructured = Unstructured::new(&buf);
15432        Self::arbitrary(&mut unstructured).unwrap_or_default()
15433    }
15434}
15435impl Default for HIGHRES_IMU_DATA {
15436    fn default() -> Self {
15437        Self::DEFAULT.clone()
15438    }
15439}
15440impl MessageData for HIGHRES_IMU_DATA {
15441    type Message = MavMessage;
15442    const ID: u32 = 105u32;
15443    const NAME: &'static str = "HIGHRES_IMU";
15444    const EXTRA_CRC: u8 = 93u8;
15445    const ENCODED_LEN: usize = 63usize;
15446    fn deser(
15447        _version: MavlinkVersion,
15448        __input: &[u8],
15449    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15450        let avail_len = __input.len();
15451        let mut payload_buf = [0; Self::ENCODED_LEN];
15452        let mut buf = if avail_len < Self::ENCODED_LEN {
15453            payload_buf[0..avail_len].copy_from_slice(__input);
15454            Bytes::new(&payload_buf)
15455        } else {
15456            Bytes::new(__input)
15457        };
15458        let mut __struct = Self::default();
15459        __struct.time_usec = buf.get_u64_le();
15460        __struct.xacc = buf.get_f32_le();
15461        __struct.yacc = buf.get_f32_le();
15462        __struct.zacc = buf.get_f32_le();
15463        __struct.xgyro = buf.get_f32_le();
15464        __struct.ygyro = buf.get_f32_le();
15465        __struct.zgyro = buf.get_f32_le();
15466        __struct.xmag = buf.get_f32_le();
15467        __struct.ymag = buf.get_f32_le();
15468        __struct.zmag = buf.get_f32_le();
15469        __struct.abs_pressure = buf.get_f32_le();
15470        __struct.diff_pressure = buf.get_f32_le();
15471        __struct.pressure_alt = buf.get_f32_le();
15472        __struct.temperature = buf.get_f32_le();
15473        let tmp = buf.get_u16_le();
15474        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
15475            tmp & HighresImuUpdatedFlags::all().bits(),
15476        )
15477        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15478            flag_type: "HighresImuUpdatedFlags",
15479            value: tmp as u32,
15480        })?;
15481        __struct.id = buf.get_u8();
15482        Ok(__struct)
15483    }
15484    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15485        let mut __tmp = BytesMut::new(bytes);
15486        #[allow(clippy::absurd_extreme_comparisons)]
15487        #[allow(unused_comparisons)]
15488        if __tmp.remaining() < Self::ENCODED_LEN {
15489            panic!(
15490                "buffer is too small (need {} bytes, but got {})",
15491                Self::ENCODED_LEN,
15492                __tmp.remaining(),
15493            )
15494        }
15495        __tmp.put_u64_le(self.time_usec);
15496        __tmp.put_f32_le(self.xacc);
15497        __tmp.put_f32_le(self.yacc);
15498        __tmp.put_f32_le(self.zacc);
15499        __tmp.put_f32_le(self.xgyro);
15500        __tmp.put_f32_le(self.ygyro);
15501        __tmp.put_f32_le(self.zgyro);
15502        __tmp.put_f32_le(self.xmag);
15503        __tmp.put_f32_le(self.ymag);
15504        __tmp.put_f32_le(self.zmag);
15505        __tmp.put_f32_le(self.abs_pressure);
15506        __tmp.put_f32_le(self.diff_pressure);
15507        __tmp.put_f32_le(self.pressure_alt);
15508        __tmp.put_f32_le(self.temperature);
15509        __tmp.put_u16_le(self.fields_updated.bits());
15510        __tmp.put_u8(self.id);
15511        if matches!(version, MavlinkVersion::V2) {
15512            let len = __tmp.len();
15513            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15514        } else {
15515            __tmp.len()
15516        }
15517    }
15518}
15519#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
15520#[doc = "Message appropriate for high latency connections like Iridium."]
15521#[doc = ""]
15522#[doc = "ID: 234"]
15523#[derive(Debug, Clone, PartialEq)]
15524#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15525#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15526pub struct HIGH_LATENCY_DATA {
15527    #[doc = "A bitfield for use for autopilot-specific flags."]
15528    pub custom_mode: u32,
15529    #[doc = "Latitude"]
15530    pub latitude: i32,
15531    #[doc = "Longitude"]
15532    pub longitude: i32,
15533    #[doc = "roll"]
15534    pub roll: i16,
15535    #[doc = "pitch"]
15536    pub pitch: i16,
15537    #[doc = "heading"]
15538    pub heading: u16,
15539    #[doc = "heading setpoint"]
15540    pub heading_sp: i16,
15541    #[doc = "Altitude above mean sea level"]
15542    pub altitude_amsl: i16,
15543    #[doc = "Altitude setpoint relative to the home position"]
15544    pub altitude_sp: i16,
15545    #[doc = "distance to target"]
15546    pub wp_distance: u16,
15547    #[doc = "Bitmap of enabled system modes."]
15548    pub base_mode: MavModeFlag,
15549    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
15550    pub landed_state: MavLandedState,
15551    #[doc = "throttle (percentage)"]
15552    pub throttle: i8,
15553    #[doc = "airspeed"]
15554    pub airspeed: u8,
15555    #[doc = "airspeed setpoint"]
15556    pub airspeed_sp: u8,
15557    #[doc = "groundspeed"]
15558    pub groundspeed: u8,
15559    #[doc = "climb rate"]
15560    pub climb_rate: i8,
15561    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15562    pub gps_nsat: u8,
15563    #[doc = "GPS Fix type."]
15564    pub gps_fix_type: GpsFixType,
15565    #[doc = "Remaining battery (percentage)"]
15566    pub battery_remaining: u8,
15567    #[doc = "Autopilot temperature (degrees C)"]
15568    pub temperature: i8,
15569    #[doc = "Air temperature (degrees C) from airspeed sensor"]
15570    pub temperature_air: i8,
15571    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
15572    pub failsafe: u8,
15573    #[doc = "current waypoint number"]
15574    pub wp_num: u8,
15575}
15576impl HIGH_LATENCY_DATA {
15577    pub const ENCODED_LEN: usize = 40usize;
15578    pub const DEFAULT: Self = Self {
15579        custom_mode: 0_u32,
15580        latitude: 0_i32,
15581        longitude: 0_i32,
15582        roll: 0_i16,
15583        pitch: 0_i16,
15584        heading: 0_u16,
15585        heading_sp: 0_i16,
15586        altitude_amsl: 0_i16,
15587        altitude_sp: 0_i16,
15588        wp_distance: 0_u16,
15589        base_mode: MavModeFlag::DEFAULT,
15590        landed_state: MavLandedState::DEFAULT,
15591        throttle: 0_i8,
15592        airspeed: 0_u8,
15593        airspeed_sp: 0_u8,
15594        groundspeed: 0_u8,
15595        climb_rate: 0_i8,
15596        gps_nsat: 0_u8,
15597        gps_fix_type: GpsFixType::DEFAULT,
15598        battery_remaining: 0_u8,
15599        temperature: 0_i8,
15600        temperature_air: 0_i8,
15601        failsafe: 0_u8,
15602        wp_num: 0_u8,
15603    };
15604    #[cfg(feature = "arbitrary")]
15605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15606        use arbitrary::{Arbitrary, Unstructured};
15607        let mut buf = [0u8; 1024];
15608        rng.fill_bytes(&mut buf);
15609        let mut unstructured = Unstructured::new(&buf);
15610        Self::arbitrary(&mut unstructured).unwrap_or_default()
15611    }
15612}
15613impl Default for HIGH_LATENCY_DATA {
15614    fn default() -> Self {
15615        Self::DEFAULT.clone()
15616    }
15617}
15618impl MessageData for HIGH_LATENCY_DATA {
15619    type Message = MavMessage;
15620    const ID: u32 = 234u32;
15621    const NAME: &'static str = "HIGH_LATENCY";
15622    const EXTRA_CRC: u8 = 150u8;
15623    const ENCODED_LEN: usize = 40usize;
15624    fn deser(
15625        _version: MavlinkVersion,
15626        __input: &[u8],
15627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15628        let avail_len = __input.len();
15629        let mut payload_buf = [0; Self::ENCODED_LEN];
15630        let mut buf = if avail_len < Self::ENCODED_LEN {
15631            payload_buf[0..avail_len].copy_from_slice(__input);
15632            Bytes::new(&payload_buf)
15633        } else {
15634            Bytes::new(__input)
15635        };
15636        let mut __struct = Self::default();
15637        __struct.custom_mode = buf.get_u32_le();
15638        __struct.latitude = buf.get_i32_le();
15639        __struct.longitude = buf.get_i32_le();
15640        __struct.roll = buf.get_i16_le();
15641        __struct.pitch = buf.get_i16_le();
15642        __struct.heading = buf.get_u16_le();
15643        __struct.heading_sp = buf.get_i16_le();
15644        __struct.altitude_amsl = buf.get_i16_le();
15645        __struct.altitude_sp = buf.get_i16_le();
15646        __struct.wp_distance = buf.get_u16_le();
15647        let tmp = buf.get_u8();
15648        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15649            ::mavlink_core::error::ParserError::InvalidFlag {
15650                flag_type: "MavModeFlag",
15651                value: tmp as u32,
15652            },
15653        )?;
15654        let tmp = buf.get_u8();
15655        __struct.landed_state =
15656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15657                enum_type: "MavLandedState",
15658                value: tmp as u32,
15659            })?;
15660        __struct.throttle = buf.get_i8();
15661        __struct.airspeed = buf.get_u8();
15662        __struct.airspeed_sp = buf.get_u8();
15663        __struct.groundspeed = buf.get_u8();
15664        __struct.climb_rate = buf.get_i8();
15665        __struct.gps_nsat = buf.get_u8();
15666        let tmp = buf.get_u8();
15667        __struct.gps_fix_type =
15668            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15669                enum_type: "GpsFixType",
15670                value: tmp as u32,
15671            })?;
15672        __struct.battery_remaining = buf.get_u8();
15673        __struct.temperature = buf.get_i8();
15674        __struct.temperature_air = buf.get_i8();
15675        __struct.failsafe = buf.get_u8();
15676        __struct.wp_num = buf.get_u8();
15677        Ok(__struct)
15678    }
15679    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15680        let mut __tmp = BytesMut::new(bytes);
15681        #[allow(clippy::absurd_extreme_comparisons)]
15682        #[allow(unused_comparisons)]
15683        if __tmp.remaining() < Self::ENCODED_LEN {
15684            panic!(
15685                "buffer is too small (need {} bytes, but got {})",
15686                Self::ENCODED_LEN,
15687                __tmp.remaining(),
15688            )
15689        }
15690        __tmp.put_u32_le(self.custom_mode);
15691        __tmp.put_i32_le(self.latitude);
15692        __tmp.put_i32_le(self.longitude);
15693        __tmp.put_i16_le(self.roll);
15694        __tmp.put_i16_le(self.pitch);
15695        __tmp.put_u16_le(self.heading);
15696        __tmp.put_i16_le(self.heading_sp);
15697        __tmp.put_i16_le(self.altitude_amsl);
15698        __tmp.put_i16_le(self.altitude_sp);
15699        __tmp.put_u16_le(self.wp_distance);
15700        __tmp.put_u8(self.base_mode.bits());
15701        __tmp.put_u8(self.landed_state as u8);
15702        __tmp.put_i8(self.throttle);
15703        __tmp.put_u8(self.airspeed);
15704        __tmp.put_u8(self.airspeed_sp);
15705        __tmp.put_u8(self.groundspeed);
15706        __tmp.put_i8(self.climb_rate);
15707        __tmp.put_u8(self.gps_nsat);
15708        __tmp.put_u8(self.gps_fix_type as u8);
15709        __tmp.put_u8(self.battery_remaining);
15710        __tmp.put_i8(self.temperature);
15711        __tmp.put_i8(self.temperature_air);
15712        __tmp.put_u8(self.failsafe);
15713        __tmp.put_u8(self.wp_num);
15714        if matches!(version, MavlinkVersion::V2) {
15715            let len = __tmp.len();
15716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15717        } else {
15718            __tmp.len()
15719        }
15720    }
15721}
15722#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15723#[doc = ""]
15724#[doc = "ID: 235"]
15725#[derive(Debug, Clone, PartialEq)]
15726#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15728pub struct HIGH_LATENCY2_DATA {
15729    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15730    pub timestamp: u32,
15731    #[doc = "Latitude"]
15732    pub latitude: i32,
15733    #[doc = "Longitude"]
15734    pub longitude: i32,
15735    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15736    pub custom_mode: u16,
15737    #[doc = "Altitude above mean sea level"]
15738    pub altitude: i16,
15739    #[doc = "Altitude setpoint"]
15740    pub target_altitude: i16,
15741    #[doc = "Distance to target waypoint or position"]
15742    pub target_distance: u16,
15743    #[doc = "Current waypoint number"]
15744    pub wp_num: u16,
15745    #[doc = "Bitmap of failure flags."]
15746    pub failure_flags: HlFailureFlag,
15747    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15748    pub mavtype: MavType,
15749    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15750    pub autopilot: MavAutopilot,
15751    #[doc = "Heading"]
15752    pub heading: u8,
15753    #[doc = "Heading setpoint"]
15754    pub target_heading: u8,
15755    #[doc = "Throttle"]
15756    pub throttle: u8,
15757    #[doc = "Airspeed"]
15758    pub airspeed: u8,
15759    #[doc = "Airspeed setpoint"]
15760    pub airspeed_sp: u8,
15761    #[doc = "Groundspeed"]
15762    pub groundspeed: u8,
15763    #[doc = "Windspeed"]
15764    pub windspeed: u8,
15765    #[doc = "Wind heading"]
15766    pub wind_heading: u8,
15767    #[doc = "Maximum error horizontal position since last message"]
15768    pub eph: u8,
15769    #[doc = "Maximum error vertical position since last message"]
15770    pub epv: u8,
15771    #[doc = "Air temperature"]
15772    pub temperature_air: i8,
15773    #[doc = "Maximum climb rate magnitude since last message"]
15774    pub climb_rate: i8,
15775    #[doc = "Battery level (-1 if field not provided)."]
15776    pub battery: i8,
15777    #[doc = "Field for custom payload."]
15778    pub custom0: i8,
15779    #[doc = "Field for custom payload."]
15780    pub custom1: i8,
15781    #[doc = "Field for custom payload."]
15782    pub custom2: i8,
15783}
15784impl HIGH_LATENCY2_DATA {
15785    pub const ENCODED_LEN: usize = 42usize;
15786    pub const DEFAULT: Self = Self {
15787        timestamp: 0_u32,
15788        latitude: 0_i32,
15789        longitude: 0_i32,
15790        custom_mode: 0_u16,
15791        altitude: 0_i16,
15792        target_altitude: 0_i16,
15793        target_distance: 0_u16,
15794        wp_num: 0_u16,
15795        failure_flags: HlFailureFlag::DEFAULT,
15796        mavtype: MavType::DEFAULT,
15797        autopilot: MavAutopilot::DEFAULT,
15798        heading: 0_u8,
15799        target_heading: 0_u8,
15800        throttle: 0_u8,
15801        airspeed: 0_u8,
15802        airspeed_sp: 0_u8,
15803        groundspeed: 0_u8,
15804        windspeed: 0_u8,
15805        wind_heading: 0_u8,
15806        eph: 0_u8,
15807        epv: 0_u8,
15808        temperature_air: 0_i8,
15809        climb_rate: 0_i8,
15810        battery: 0_i8,
15811        custom0: 0_i8,
15812        custom1: 0_i8,
15813        custom2: 0_i8,
15814    };
15815    #[cfg(feature = "arbitrary")]
15816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15817        use arbitrary::{Arbitrary, Unstructured};
15818        let mut buf = [0u8; 1024];
15819        rng.fill_bytes(&mut buf);
15820        let mut unstructured = Unstructured::new(&buf);
15821        Self::arbitrary(&mut unstructured).unwrap_or_default()
15822    }
15823}
15824impl Default for HIGH_LATENCY2_DATA {
15825    fn default() -> Self {
15826        Self::DEFAULT.clone()
15827    }
15828}
15829impl MessageData for HIGH_LATENCY2_DATA {
15830    type Message = MavMessage;
15831    const ID: u32 = 235u32;
15832    const NAME: &'static str = "HIGH_LATENCY2";
15833    const EXTRA_CRC: u8 = 179u8;
15834    const ENCODED_LEN: usize = 42usize;
15835    fn deser(
15836        _version: MavlinkVersion,
15837        __input: &[u8],
15838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15839        let avail_len = __input.len();
15840        let mut payload_buf = [0; Self::ENCODED_LEN];
15841        let mut buf = if avail_len < Self::ENCODED_LEN {
15842            payload_buf[0..avail_len].copy_from_slice(__input);
15843            Bytes::new(&payload_buf)
15844        } else {
15845            Bytes::new(__input)
15846        };
15847        let mut __struct = Self::default();
15848        __struct.timestamp = buf.get_u32_le();
15849        __struct.latitude = buf.get_i32_le();
15850        __struct.longitude = buf.get_i32_le();
15851        __struct.custom_mode = buf.get_u16_le();
15852        __struct.altitude = buf.get_i16_le();
15853        __struct.target_altitude = buf.get_i16_le();
15854        __struct.target_distance = buf.get_u16_le();
15855        __struct.wp_num = buf.get_u16_le();
15856        let tmp = buf.get_u16_le();
15857        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15858            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15859                flag_type: "HlFailureFlag",
15860                value: tmp as u32,
15861            })?;
15862        let tmp = buf.get_u8();
15863        __struct.mavtype =
15864            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15865                enum_type: "MavType",
15866                value: tmp as u32,
15867            })?;
15868        let tmp = buf.get_u8();
15869        __struct.autopilot =
15870            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15871                enum_type: "MavAutopilot",
15872                value: tmp as u32,
15873            })?;
15874        __struct.heading = buf.get_u8();
15875        __struct.target_heading = buf.get_u8();
15876        __struct.throttle = buf.get_u8();
15877        __struct.airspeed = buf.get_u8();
15878        __struct.airspeed_sp = buf.get_u8();
15879        __struct.groundspeed = buf.get_u8();
15880        __struct.windspeed = buf.get_u8();
15881        __struct.wind_heading = buf.get_u8();
15882        __struct.eph = buf.get_u8();
15883        __struct.epv = buf.get_u8();
15884        __struct.temperature_air = buf.get_i8();
15885        __struct.climb_rate = buf.get_i8();
15886        __struct.battery = buf.get_i8();
15887        __struct.custom0 = buf.get_i8();
15888        __struct.custom1 = buf.get_i8();
15889        __struct.custom2 = buf.get_i8();
15890        Ok(__struct)
15891    }
15892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15893        let mut __tmp = BytesMut::new(bytes);
15894        #[allow(clippy::absurd_extreme_comparisons)]
15895        #[allow(unused_comparisons)]
15896        if __tmp.remaining() < Self::ENCODED_LEN {
15897            panic!(
15898                "buffer is too small (need {} bytes, but got {})",
15899                Self::ENCODED_LEN,
15900                __tmp.remaining(),
15901            )
15902        }
15903        __tmp.put_u32_le(self.timestamp);
15904        __tmp.put_i32_le(self.latitude);
15905        __tmp.put_i32_le(self.longitude);
15906        __tmp.put_u16_le(self.custom_mode);
15907        __tmp.put_i16_le(self.altitude);
15908        __tmp.put_i16_le(self.target_altitude);
15909        __tmp.put_u16_le(self.target_distance);
15910        __tmp.put_u16_le(self.wp_num);
15911        __tmp.put_u16_le(self.failure_flags.bits());
15912        __tmp.put_u8(self.mavtype as u8);
15913        __tmp.put_u8(self.autopilot as u8);
15914        __tmp.put_u8(self.heading);
15915        __tmp.put_u8(self.target_heading);
15916        __tmp.put_u8(self.throttle);
15917        __tmp.put_u8(self.airspeed);
15918        __tmp.put_u8(self.airspeed_sp);
15919        __tmp.put_u8(self.groundspeed);
15920        __tmp.put_u8(self.windspeed);
15921        __tmp.put_u8(self.wind_heading);
15922        __tmp.put_u8(self.eph);
15923        __tmp.put_u8(self.epv);
15924        __tmp.put_i8(self.temperature_air);
15925        __tmp.put_i8(self.climb_rate);
15926        __tmp.put_i8(self.battery);
15927        __tmp.put_i8(self.custom0);
15928        __tmp.put_i8(self.custom1);
15929        __tmp.put_i8(self.custom2);
15930        if matches!(version, MavlinkVersion::V2) {
15931            let len = __tmp.len();
15932            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15933        } else {
15934            __tmp.len()
15935        }
15936    }
15937}
15938#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15939#[doc = ""]
15940#[doc = "ID: 93"]
15941#[derive(Debug, Clone, PartialEq)]
15942#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15943#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15944pub struct HIL_ACTUATOR_CONTROLS_DATA {
15945    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15946    pub time_usec: u64,
15947    #[doc = "Flags bitmask."]
15948    pub flags: HilActuatorControlsFlags,
15949    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15951    pub controls: [f32; 16],
15952    #[doc = "System mode. Includes arming state."]
15953    pub mode: MavModeFlag,
15954}
15955impl HIL_ACTUATOR_CONTROLS_DATA {
15956    pub const ENCODED_LEN: usize = 81usize;
15957    pub const DEFAULT: Self = Self {
15958        time_usec: 0_u64,
15959        flags: HilActuatorControlsFlags::DEFAULT,
15960        controls: [0.0_f32; 16usize],
15961        mode: MavModeFlag::DEFAULT,
15962    };
15963    #[cfg(feature = "arbitrary")]
15964    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15965        use arbitrary::{Arbitrary, Unstructured};
15966        let mut buf = [0u8; 1024];
15967        rng.fill_bytes(&mut buf);
15968        let mut unstructured = Unstructured::new(&buf);
15969        Self::arbitrary(&mut unstructured).unwrap_or_default()
15970    }
15971}
15972impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15973    fn default() -> Self {
15974        Self::DEFAULT.clone()
15975    }
15976}
15977impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15978    type Message = MavMessage;
15979    const ID: u32 = 93u32;
15980    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15981    const EXTRA_CRC: u8 = 47u8;
15982    const ENCODED_LEN: usize = 81usize;
15983    fn deser(
15984        _version: MavlinkVersion,
15985        __input: &[u8],
15986    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15987        let avail_len = __input.len();
15988        let mut payload_buf = [0; Self::ENCODED_LEN];
15989        let mut buf = if avail_len < Self::ENCODED_LEN {
15990            payload_buf[0..avail_len].copy_from_slice(__input);
15991            Bytes::new(&payload_buf)
15992        } else {
15993            Bytes::new(__input)
15994        };
15995        let mut __struct = Self::default();
15996        __struct.time_usec = buf.get_u64_le();
15997        let tmp = buf.get_u64_le();
15998        __struct.flags =
15999            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
16000                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16001                    flag_type: "HilActuatorControlsFlags",
16002                    value: tmp as u32,
16003                })?;
16004        for v in &mut __struct.controls {
16005            let val = buf.get_f32_le();
16006            *v = val;
16007        }
16008        let tmp = buf.get_u8();
16009        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
16010            ::mavlink_core::error::ParserError::InvalidFlag {
16011                flag_type: "MavModeFlag",
16012                value: tmp as u32,
16013            },
16014        )?;
16015        Ok(__struct)
16016    }
16017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16018        let mut __tmp = BytesMut::new(bytes);
16019        #[allow(clippy::absurd_extreme_comparisons)]
16020        #[allow(unused_comparisons)]
16021        if __tmp.remaining() < Self::ENCODED_LEN {
16022            panic!(
16023                "buffer is too small (need {} bytes, but got {})",
16024                Self::ENCODED_LEN,
16025                __tmp.remaining(),
16026            )
16027        }
16028        __tmp.put_u64_le(self.time_usec);
16029        __tmp.put_u64_le(self.flags.bits());
16030        for val in &self.controls {
16031            __tmp.put_f32_le(*val);
16032        }
16033        __tmp.put_u8(self.mode.bits());
16034        if matches!(version, MavlinkVersion::V2) {
16035            let len = __tmp.len();
16036            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16037        } else {
16038            __tmp.len()
16039        }
16040    }
16041}
16042#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
16043#[doc = ""]
16044#[doc = "ID: 91"]
16045#[derive(Debug, Clone, PartialEq)]
16046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16048pub struct HIL_CONTROLS_DATA {
16049    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16050    pub time_usec: u64,
16051    #[doc = "Control output -1 .. 1"]
16052    pub roll_ailerons: f32,
16053    #[doc = "Control output -1 .. 1"]
16054    pub pitch_elevator: f32,
16055    #[doc = "Control output -1 .. 1"]
16056    pub yaw_rudder: f32,
16057    #[doc = "Throttle 0 .. 1"]
16058    pub throttle: f32,
16059    #[doc = "Aux 1, -1 .. 1"]
16060    pub aux1: f32,
16061    #[doc = "Aux 2, -1 .. 1"]
16062    pub aux2: f32,
16063    #[doc = "Aux 3, -1 .. 1"]
16064    pub aux3: f32,
16065    #[doc = "Aux 4, -1 .. 1"]
16066    pub aux4: f32,
16067    #[doc = "System mode."]
16068    pub mode: MavMode,
16069    #[doc = "Navigation mode (MAV_NAV_MODE)"]
16070    pub nav_mode: u8,
16071}
16072impl HIL_CONTROLS_DATA {
16073    pub const ENCODED_LEN: usize = 42usize;
16074    pub const DEFAULT: Self = Self {
16075        time_usec: 0_u64,
16076        roll_ailerons: 0.0_f32,
16077        pitch_elevator: 0.0_f32,
16078        yaw_rudder: 0.0_f32,
16079        throttle: 0.0_f32,
16080        aux1: 0.0_f32,
16081        aux2: 0.0_f32,
16082        aux3: 0.0_f32,
16083        aux4: 0.0_f32,
16084        mode: MavMode::DEFAULT,
16085        nav_mode: 0_u8,
16086    };
16087    #[cfg(feature = "arbitrary")]
16088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16089        use arbitrary::{Arbitrary, Unstructured};
16090        let mut buf = [0u8; 1024];
16091        rng.fill_bytes(&mut buf);
16092        let mut unstructured = Unstructured::new(&buf);
16093        Self::arbitrary(&mut unstructured).unwrap_or_default()
16094    }
16095}
16096impl Default for HIL_CONTROLS_DATA {
16097    fn default() -> Self {
16098        Self::DEFAULT.clone()
16099    }
16100}
16101impl MessageData for HIL_CONTROLS_DATA {
16102    type Message = MavMessage;
16103    const ID: u32 = 91u32;
16104    const NAME: &'static str = "HIL_CONTROLS";
16105    const EXTRA_CRC: u8 = 63u8;
16106    const ENCODED_LEN: usize = 42usize;
16107    fn deser(
16108        _version: MavlinkVersion,
16109        __input: &[u8],
16110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16111        let avail_len = __input.len();
16112        let mut payload_buf = [0; Self::ENCODED_LEN];
16113        let mut buf = if avail_len < Self::ENCODED_LEN {
16114            payload_buf[0..avail_len].copy_from_slice(__input);
16115            Bytes::new(&payload_buf)
16116        } else {
16117            Bytes::new(__input)
16118        };
16119        let mut __struct = Self::default();
16120        __struct.time_usec = buf.get_u64_le();
16121        __struct.roll_ailerons = buf.get_f32_le();
16122        __struct.pitch_elevator = buf.get_f32_le();
16123        __struct.yaw_rudder = buf.get_f32_le();
16124        __struct.throttle = buf.get_f32_le();
16125        __struct.aux1 = buf.get_f32_le();
16126        __struct.aux2 = buf.get_f32_le();
16127        __struct.aux3 = buf.get_f32_le();
16128        __struct.aux4 = buf.get_f32_le();
16129        let tmp = buf.get_u8();
16130        __struct.mode =
16131            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16132                enum_type: "MavMode",
16133                value: tmp as u32,
16134            })?;
16135        __struct.nav_mode = buf.get_u8();
16136        Ok(__struct)
16137    }
16138    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16139        let mut __tmp = BytesMut::new(bytes);
16140        #[allow(clippy::absurd_extreme_comparisons)]
16141        #[allow(unused_comparisons)]
16142        if __tmp.remaining() < Self::ENCODED_LEN {
16143            panic!(
16144                "buffer is too small (need {} bytes, but got {})",
16145                Self::ENCODED_LEN,
16146                __tmp.remaining(),
16147            )
16148        }
16149        __tmp.put_u64_le(self.time_usec);
16150        __tmp.put_f32_le(self.roll_ailerons);
16151        __tmp.put_f32_le(self.pitch_elevator);
16152        __tmp.put_f32_le(self.yaw_rudder);
16153        __tmp.put_f32_le(self.throttle);
16154        __tmp.put_f32_le(self.aux1);
16155        __tmp.put_f32_le(self.aux2);
16156        __tmp.put_f32_le(self.aux3);
16157        __tmp.put_f32_le(self.aux4);
16158        __tmp.put_u8(self.mode as u8);
16159        __tmp.put_u8(self.nav_mode);
16160        if matches!(version, MavlinkVersion::V2) {
16161            let len = __tmp.len();
16162            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16163        } else {
16164            __tmp.len()
16165        }
16166    }
16167}
16168#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
16169#[doc = ""]
16170#[doc = "ID: 113"]
16171#[derive(Debug, Clone, PartialEq)]
16172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16173#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16174pub struct HIL_GPS_DATA {
16175    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16176    pub time_usec: u64,
16177    #[doc = "Latitude (WGS84)"]
16178    pub lat: i32,
16179    #[doc = "Longitude (WGS84)"]
16180    pub lon: i32,
16181    #[doc = "Altitude (MSL). Positive for up."]
16182    pub alt: i32,
16183    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16184    pub eph: u16,
16185    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
16186    pub epv: u16,
16187    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
16188    pub vel: u16,
16189    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
16190    pub vn: i16,
16191    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
16192    pub ve: i16,
16193    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
16194    pub vd: i16,
16195    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
16196    pub cog: u16,
16197    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
16198    pub fix_type: u8,
16199    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
16200    pub satellites_visible: u8,
16201    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
16202    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16203    pub id: u8,
16204    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
16205    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16206    pub yaw: u16,
16207}
16208impl HIL_GPS_DATA {
16209    pub const ENCODED_LEN: usize = 39usize;
16210    pub const DEFAULT: Self = Self {
16211        time_usec: 0_u64,
16212        lat: 0_i32,
16213        lon: 0_i32,
16214        alt: 0_i32,
16215        eph: 0_u16,
16216        epv: 0_u16,
16217        vel: 0_u16,
16218        vn: 0_i16,
16219        ve: 0_i16,
16220        vd: 0_i16,
16221        cog: 0_u16,
16222        fix_type: 0_u8,
16223        satellites_visible: 0_u8,
16224        id: 0_u8,
16225        yaw: 0_u16,
16226    };
16227    #[cfg(feature = "arbitrary")]
16228    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16229        use arbitrary::{Arbitrary, Unstructured};
16230        let mut buf = [0u8; 1024];
16231        rng.fill_bytes(&mut buf);
16232        let mut unstructured = Unstructured::new(&buf);
16233        Self::arbitrary(&mut unstructured).unwrap_or_default()
16234    }
16235}
16236impl Default for HIL_GPS_DATA {
16237    fn default() -> Self {
16238        Self::DEFAULT.clone()
16239    }
16240}
16241impl MessageData for HIL_GPS_DATA {
16242    type Message = MavMessage;
16243    const ID: u32 = 113u32;
16244    const NAME: &'static str = "HIL_GPS";
16245    const EXTRA_CRC: u8 = 124u8;
16246    const ENCODED_LEN: usize = 39usize;
16247    fn deser(
16248        _version: MavlinkVersion,
16249        __input: &[u8],
16250    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16251        let avail_len = __input.len();
16252        let mut payload_buf = [0; Self::ENCODED_LEN];
16253        let mut buf = if avail_len < Self::ENCODED_LEN {
16254            payload_buf[0..avail_len].copy_from_slice(__input);
16255            Bytes::new(&payload_buf)
16256        } else {
16257            Bytes::new(__input)
16258        };
16259        let mut __struct = Self::default();
16260        __struct.time_usec = buf.get_u64_le();
16261        __struct.lat = buf.get_i32_le();
16262        __struct.lon = buf.get_i32_le();
16263        __struct.alt = buf.get_i32_le();
16264        __struct.eph = buf.get_u16_le();
16265        __struct.epv = buf.get_u16_le();
16266        __struct.vel = buf.get_u16_le();
16267        __struct.vn = buf.get_i16_le();
16268        __struct.ve = buf.get_i16_le();
16269        __struct.vd = buf.get_i16_le();
16270        __struct.cog = buf.get_u16_le();
16271        __struct.fix_type = buf.get_u8();
16272        __struct.satellites_visible = buf.get_u8();
16273        __struct.id = buf.get_u8();
16274        __struct.yaw = buf.get_u16_le();
16275        Ok(__struct)
16276    }
16277    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16278        let mut __tmp = BytesMut::new(bytes);
16279        #[allow(clippy::absurd_extreme_comparisons)]
16280        #[allow(unused_comparisons)]
16281        if __tmp.remaining() < Self::ENCODED_LEN {
16282            panic!(
16283                "buffer is too small (need {} bytes, but got {})",
16284                Self::ENCODED_LEN,
16285                __tmp.remaining(),
16286            )
16287        }
16288        __tmp.put_u64_le(self.time_usec);
16289        __tmp.put_i32_le(self.lat);
16290        __tmp.put_i32_le(self.lon);
16291        __tmp.put_i32_le(self.alt);
16292        __tmp.put_u16_le(self.eph);
16293        __tmp.put_u16_le(self.epv);
16294        __tmp.put_u16_le(self.vel);
16295        __tmp.put_i16_le(self.vn);
16296        __tmp.put_i16_le(self.ve);
16297        __tmp.put_i16_le(self.vd);
16298        __tmp.put_u16_le(self.cog);
16299        __tmp.put_u8(self.fix_type);
16300        __tmp.put_u8(self.satellites_visible);
16301        __tmp.put_u8(self.id);
16302        __tmp.put_u16_le(self.yaw);
16303        if matches!(version, MavlinkVersion::V2) {
16304            let len = __tmp.len();
16305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16306        } else {
16307            __tmp.len()
16308        }
16309    }
16310}
16311#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
16312#[doc = ""]
16313#[doc = "ID: 114"]
16314#[derive(Debug, Clone, PartialEq)]
16315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16317pub struct HIL_OPTICAL_FLOW_DATA {
16318    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16319    pub time_usec: u64,
16320    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
16321    pub integration_time_us: u32,
16322    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
16323    pub integrated_x: f32,
16324    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
16325    pub integrated_y: f32,
16326    #[doc = "RH rotation around X axis"]
16327    pub integrated_xgyro: f32,
16328    #[doc = "RH rotation around Y axis"]
16329    pub integrated_ygyro: f32,
16330    #[doc = "RH rotation around Z axis"]
16331    pub integrated_zgyro: f32,
16332    #[doc = "Time since the distance was sampled."]
16333    pub time_delta_distance_us: u32,
16334    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
16335    pub distance: f32,
16336    #[doc = "Temperature"]
16337    pub temperature: i16,
16338    #[doc = "Sensor ID"]
16339    pub sensor_id: u8,
16340    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
16341    pub quality: u8,
16342}
16343impl HIL_OPTICAL_FLOW_DATA {
16344    pub const ENCODED_LEN: usize = 44usize;
16345    pub const DEFAULT: Self = Self {
16346        time_usec: 0_u64,
16347        integration_time_us: 0_u32,
16348        integrated_x: 0.0_f32,
16349        integrated_y: 0.0_f32,
16350        integrated_xgyro: 0.0_f32,
16351        integrated_ygyro: 0.0_f32,
16352        integrated_zgyro: 0.0_f32,
16353        time_delta_distance_us: 0_u32,
16354        distance: 0.0_f32,
16355        temperature: 0_i16,
16356        sensor_id: 0_u8,
16357        quality: 0_u8,
16358    };
16359    #[cfg(feature = "arbitrary")]
16360    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16361        use arbitrary::{Arbitrary, Unstructured};
16362        let mut buf = [0u8; 1024];
16363        rng.fill_bytes(&mut buf);
16364        let mut unstructured = Unstructured::new(&buf);
16365        Self::arbitrary(&mut unstructured).unwrap_or_default()
16366    }
16367}
16368impl Default for HIL_OPTICAL_FLOW_DATA {
16369    fn default() -> Self {
16370        Self::DEFAULT.clone()
16371    }
16372}
16373impl MessageData for HIL_OPTICAL_FLOW_DATA {
16374    type Message = MavMessage;
16375    const ID: u32 = 114u32;
16376    const NAME: &'static str = "HIL_OPTICAL_FLOW";
16377    const EXTRA_CRC: u8 = 237u8;
16378    const ENCODED_LEN: usize = 44usize;
16379    fn deser(
16380        _version: MavlinkVersion,
16381        __input: &[u8],
16382    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16383        let avail_len = __input.len();
16384        let mut payload_buf = [0; Self::ENCODED_LEN];
16385        let mut buf = if avail_len < Self::ENCODED_LEN {
16386            payload_buf[0..avail_len].copy_from_slice(__input);
16387            Bytes::new(&payload_buf)
16388        } else {
16389            Bytes::new(__input)
16390        };
16391        let mut __struct = Self::default();
16392        __struct.time_usec = buf.get_u64_le();
16393        __struct.integration_time_us = buf.get_u32_le();
16394        __struct.integrated_x = buf.get_f32_le();
16395        __struct.integrated_y = buf.get_f32_le();
16396        __struct.integrated_xgyro = buf.get_f32_le();
16397        __struct.integrated_ygyro = buf.get_f32_le();
16398        __struct.integrated_zgyro = buf.get_f32_le();
16399        __struct.time_delta_distance_us = buf.get_u32_le();
16400        __struct.distance = buf.get_f32_le();
16401        __struct.temperature = buf.get_i16_le();
16402        __struct.sensor_id = buf.get_u8();
16403        __struct.quality = buf.get_u8();
16404        Ok(__struct)
16405    }
16406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16407        let mut __tmp = BytesMut::new(bytes);
16408        #[allow(clippy::absurd_extreme_comparisons)]
16409        #[allow(unused_comparisons)]
16410        if __tmp.remaining() < Self::ENCODED_LEN {
16411            panic!(
16412                "buffer is too small (need {} bytes, but got {})",
16413                Self::ENCODED_LEN,
16414                __tmp.remaining(),
16415            )
16416        }
16417        __tmp.put_u64_le(self.time_usec);
16418        __tmp.put_u32_le(self.integration_time_us);
16419        __tmp.put_f32_le(self.integrated_x);
16420        __tmp.put_f32_le(self.integrated_y);
16421        __tmp.put_f32_le(self.integrated_xgyro);
16422        __tmp.put_f32_le(self.integrated_ygyro);
16423        __tmp.put_f32_le(self.integrated_zgyro);
16424        __tmp.put_u32_le(self.time_delta_distance_us);
16425        __tmp.put_f32_le(self.distance);
16426        __tmp.put_i16_le(self.temperature);
16427        __tmp.put_u8(self.sensor_id);
16428        __tmp.put_u8(self.quality);
16429        if matches!(version, MavlinkVersion::V2) {
16430            let len = __tmp.len();
16431            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16432        } else {
16433            __tmp.len()
16434        }
16435    }
16436}
16437#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
16438#[doc = ""]
16439#[doc = "ID: 92"]
16440#[derive(Debug, Clone, PartialEq)]
16441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16443pub struct HIL_RC_INPUTS_RAW_DATA {
16444    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16445    pub time_usec: u64,
16446    #[doc = "RC channel 1 value"]
16447    pub chan1_raw: u16,
16448    #[doc = "RC channel 2 value"]
16449    pub chan2_raw: u16,
16450    #[doc = "RC channel 3 value"]
16451    pub chan3_raw: u16,
16452    #[doc = "RC channel 4 value"]
16453    pub chan4_raw: u16,
16454    #[doc = "RC channel 5 value"]
16455    pub chan5_raw: u16,
16456    #[doc = "RC channel 6 value"]
16457    pub chan6_raw: u16,
16458    #[doc = "RC channel 7 value"]
16459    pub chan7_raw: u16,
16460    #[doc = "RC channel 8 value"]
16461    pub chan8_raw: u16,
16462    #[doc = "RC channel 9 value"]
16463    pub chan9_raw: u16,
16464    #[doc = "RC channel 10 value"]
16465    pub chan10_raw: u16,
16466    #[doc = "RC channel 11 value"]
16467    pub chan11_raw: u16,
16468    #[doc = "RC channel 12 value"]
16469    pub chan12_raw: u16,
16470    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
16471    pub rssi: u8,
16472}
16473impl HIL_RC_INPUTS_RAW_DATA {
16474    pub const ENCODED_LEN: usize = 33usize;
16475    pub const DEFAULT: Self = Self {
16476        time_usec: 0_u64,
16477        chan1_raw: 0_u16,
16478        chan2_raw: 0_u16,
16479        chan3_raw: 0_u16,
16480        chan4_raw: 0_u16,
16481        chan5_raw: 0_u16,
16482        chan6_raw: 0_u16,
16483        chan7_raw: 0_u16,
16484        chan8_raw: 0_u16,
16485        chan9_raw: 0_u16,
16486        chan10_raw: 0_u16,
16487        chan11_raw: 0_u16,
16488        chan12_raw: 0_u16,
16489        rssi: 0_u8,
16490    };
16491    #[cfg(feature = "arbitrary")]
16492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16493        use arbitrary::{Arbitrary, Unstructured};
16494        let mut buf = [0u8; 1024];
16495        rng.fill_bytes(&mut buf);
16496        let mut unstructured = Unstructured::new(&buf);
16497        Self::arbitrary(&mut unstructured).unwrap_or_default()
16498    }
16499}
16500impl Default for HIL_RC_INPUTS_RAW_DATA {
16501    fn default() -> Self {
16502        Self::DEFAULT.clone()
16503    }
16504}
16505impl MessageData for HIL_RC_INPUTS_RAW_DATA {
16506    type Message = MavMessage;
16507    const ID: u32 = 92u32;
16508    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
16509    const EXTRA_CRC: u8 = 54u8;
16510    const ENCODED_LEN: usize = 33usize;
16511    fn deser(
16512        _version: MavlinkVersion,
16513        __input: &[u8],
16514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16515        let avail_len = __input.len();
16516        let mut payload_buf = [0; Self::ENCODED_LEN];
16517        let mut buf = if avail_len < Self::ENCODED_LEN {
16518            payload_buf[0..avail_len].copy_from_slice(__input);
16519            Bytes::new(&payload_buf)
16520        } else {
16521            Bytes::new(__input)
16522        };
16523        let mut __struct = Self::default();
16524        __struct.time_usec = buf.get_u64_le();
16525        __struct.chan1_raw = buf.get_u16_le();
16526        __struct.chan2_raw = buf.get_u16_le();
16527        __struct.chan3_raw = buf.get_u16_le();
16528        __struct.chan4_raw = buf.get_u16_le();
16529        __struct.chan5_raw = buf.get_u16_le();
16530        __struct.chan6_raw = buf.get_u16_le();
16531        __struct.chan7_raw = buf.get_u16_le();
16532        __struct.chan8_raw = buf.get_u16_le();
16533        __struct.chan9_raw = buf.get_u16_le();
16534        __struct.chan10_raw = buf.get_u16_le();
16535        __struct.chan11_raw = buf.get_u16_le();
16536        __struct.chan12_raw = buf.get_u16_le();
16537        __struct.rssi = buf.get_u8();
16538        Ok(__struct)
16539    }
16540    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16541        let mut __tmp = BytesMut::new(bytes);
16542        #[allow(clippy::absurd_extreme_comparisons)]
16543        #[allow(unused_comparisons)]
16544        if __tmp.remaining() < Self::ENCODED_LEN {
16545            panic!(
16546                "buffer is too small (need {} bytes, but got {})",
16547                Self::ENCODED_LEN,
16548                __tmp.remaining(),
16549            )
16550        }
16551        __tmp.put_u64_le(self.time_usec);
16552        __tmp.put_u16_le(self.chan1_raw);
16553        __tmp.put_u16_le(self.chan2_raw);
16554        __tmp.put_u16_le(self.chan3_raw);
16555        __tmp.put_u16_le(self.chan4_raw);
16556        __tmp.put_u16_le(self.chan5_raw);
16557        __tmp.put_u16_le(self.chan6_raw);
16558        __tmp.put_u16_le(self.chan7_raw);
16559        __tmp.put_u16_le(self.chan8_raw);
16560        __tmp.put_u16_le(self.chan9_raw);
16561        __tmp.put_u16_le(self.chan10_raw);
16562        __tmp.put_u16_le(self.chan11_raw);
16563        __tmp.put_u16_le(self.chan12_raw);
16564        __tmp.put_u8(self.rssi);
16565        if matches!(version, MavlinkVersion::V2) {
16566            let len = __tmp.len();
16567            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16568        } else {
16569            __tmp.len()
16570        }
16571    }
16572}
16573#[doc = "The IMU readings in SI units in NED body frame."]
16574#[doc = ""]
16575#[doc = "ID: 107"]
16576#[derive(Debug, Clone, PartialEq)]
16577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16579pub struct HIL_SENSOR_DATA {
16580    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16581    pub time_usec: u64,
16582    #[doc = "X acceleration"]
16583    pub xacc: f32,
16584    #[doc = "Y acceleration"]
16585    pub yacc: f32,
16586    #[doc = "Z acceleration"]
16587    pub zacc: f32,
16588    #[doc = "Angular speed around X axis in body frame"]
16589    pub xgyro: f32,
16590    #[doc = "Angular speed around Y axis in body frame"]
16591    pub ygyro: f32,
16592    #[doc = "Angular speed around Z axis in body frame"]
16593    pub zgyro: f32,
16594    #[doc = "X Magnetic field"]
16595    pub xmag: f32,
16596    #[doc = "Y Magnetic field"]
16597    pub ymag: f32,
16598    #[doc = "Z Magnetic field"]
16599    pub zmag: f32,
16600    #[doc = "Absolute pressure"]
16601    pub abs_pressure: f32,
16602    #[doc = "Differential pressure (airspeed)"]
16603    pub diff_pressure: f32,
16604    #[doc = "Altitude calculated from pressure"]
16605    pub pressure_alt: f32,
16606    #[doc = "Temperature"]
16607    pub temperature: f32,
16608    #[doc = "Bitmap for fields that have updated since last message"]
16609    pub fields_updated: HilSensorUpdatedFlags,
16610    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
16611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16612    pub id: u8,
16613}
16614impl HIL_SENSOR_DATA {
16615    pub const ENCODED_LEN: usize = 65usize;
16616    pub const DEFAULT: Self = Self {
16617        time_usec: 0_u64,
16618        xacc: 0.0_f32,
16619        yacc: 0.0_f32,
16620        zacc: 0.0_f32,
16621        xgyro: 0.0_f32,
16622        ygyro: 0.0_f32,
16623        zgyro: 0.0_f32,
16624        xmag: 0.0_f32,
16625        ymag: 0.0_f32,
16626        zmag: 0.0_f32,
16627        abs_pressure: 0.0_f32,
16628        diff_pressure: 0.0_f32,
16629        pressure_alt: 0.0_f32,
16630        temperature: 0.0_f32,
16631        fields_updated: HilSensorUpdatedFlags::DEFAULT,
16632        id: 0_u8,
16633    };
16634    #[cfg(feature = "arbitrary")]
16635    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16636        use arbitrary::{Arbitrary, Unstructured};
16637        let mut buf = [0u8; 1024];
16638        rng.fill_bytes(&mut buf);
16639        let mut unstructured = Unstructured::new(&buf);
16640        Self::arbitrary(&mut unstructured).unwrap_or_default()
16641    }
16642}
16643impl Default for HIL_SENSOR_DATA {
16644    fn default() -> Self {
16645        Self::DEFAULT.clone()
16646    }
16647}
16648impl MessageData for HIL_SENSOR_DATA {
16649    type Message = MavMessage;
16650    const ID: u32 = 107u32;
16651    const NAME: &'static str = "HIL_SENSOR";
16652    const EXTRA_CRC: u8 = 108u8;
16653    const ENCODED_LEN: usize = 65usize;
16654    fn deser(
16655        _version: MavlinkVersion,
16656        __input: &[u8],
16657    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16658        let avail_len = __input.len();
16659        let mut payload_buf = [0; Self::ENCODED_LEN];
16660        let mut buf = if avail_len < Self::ENCODED_LEN {
16661            payload_buf[0..avail_len].copy_from_slice(__input);
16662            Bytes::new(&payload_buf)
16663        } else {
16664            Bytes::new(__input)
16665        };
16666        let mut __struct = Self::default();
16667        __struct.time_usec = buf.get_u64_le();
16668        __struct.xacc = buf.get_f32_le();
16669        __struct.yacc = buf.get_f32_le();
16670        __struct.zacc = buf.get_f32_le();
16671        __struct.xgyro = buf.get_f32_le();
16672        __struct.ygyro = buf.get_f32_le();
16673        __struct.zgyro = buf.get_f32_le();
16674        __struct.xmag = buf.get_f32_le();
16675        __struct.ymag = buf.get_f32_le();
16676        __struct.zmag = buf.get_f32_le();
16677        __struct.abs_pressure = buf.get_f32_le();
16678        __struct.diff_pressure = buf.get_f32_le();
16679        __struct.pressure_alt = buf.get_f32_le();
16680        __struct.temperature = buf.get_f32_le();
16681        let tmp = buf.get_u32_le();
16682        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16683            tmp & HilSensorUpdatedFlags::all().bits(),
16684        )
16685        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16686            flag_type: "HilSensorUpdatedFlags",
16687            value: tmp as u32,
16688        })?;
16689        __struct.id = buf.get_u8();
16690        Ok(__struct)
16691    }
16692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16693        let mut __tmp = BytesMut::new(bytes);
16694        #[allow(clippy::absurd_extreme_comparisons)]
16695        #[allow(unused_comparisons)]
16696        if __tmp.remaining() < Self::ENCODED_LEN {
16697            panic!(
16698                "buffer is too small (need {} bytes, but got {})",
16699                Self::ENCODED_LEN,
16700                __tmp.remaining(),
16701            )
16702        }
16703        __tmp.put_u64_le(self.time_usec);
16704        __tmp.put_f32_le(self.xacc);
16705        __tmp.put_f32_le(self.yacc);
16706        __tmp.put_f32_le(self.zacc);
16707        __tmp.put_f32_le(self.xgyro);
16708        __tmp.put_f32_le(self.ygyro);
16709        __tmp.put_f32_le(self.zgyro);
16710        __tmp.put_f32_le(self.xmag);
16711        __tmp.put_f32_le(self.ymag);
16712        __tmp.put_f32_le(self.zmag);
16713        __tmp.put_f32_le(self.abs_pressure);
16714        __tmp.put_f32_le(self.diff_pressure);
16715        __tmp.put_f32_le(self.pressure_alt);
16716        __tmp.put_f32_le(self.temperature);
16717        __tmp.put_u32_le(self.fields_updated.bits());
16718        __tmp.put_u8(self.id);
16719        if matches!(version, MavlinkVersion::V2) {
16720            let len = __tmp.len();
16721            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16722        } else {
16723            __tmp.len()
16724        }
16725    }
16726}
16727#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16728#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16729#[doc = ""]
16730#[doc = "ID: 90"]
16731#[derive(Debug, Clone, PartialEq)]
16732#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16733#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16734pub struct HIL_STATE_DATA {
16735    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16736    pub time_usec: u64,
16737    #[doc = "Roll angle"]
16738    pub roll: f32,
16739    #[doc = "Pitch angle"]
16740    pub pitch: f32,
16741    #[doc = "Yaw angle"]
16742    pub yaw: f32,
16743    #[doc = "Body frame roll / phi angular speed"]
16744    pub rollspeed: f32,
16745    #[doc = "Body frame pitch / theta angular speed"]
16746    pub pitchspeed: f32,
16747    #[doc = "Body frame yaw / psi angular speed"]
16748    pub yawspeed: f32,
16749    #[doc = "Latitude"]
16750    pub lat: i32,
16751    #[doc = "Longitude"]
16752    pub lon: i32,
16753    #[doc = "Altitude"]
16754    pub alt: i32,
16755    #[doc = "Ground X Speed (Latitude)"]
16756    pub vx: i16,
16757    #[doc = "Ground Y Speed (Longitude)"]
16758    pub vy: i16,
16759    #[doc = "Ground Z Speed (Altitude)"]
16760    pub vz: i16,
16761    #[doc = "X acceleration"]
16762    pub xacc: i16,
16763    #[doc = "Y acceleration"]
16764    pub yacc: i16,
16765    #[doc = "Z acceleration"]
16766    pub zacc: i16,
16767}
16768impl HIL_STATE_DATA {
16769    pub const ENCODED_LEN: usize = 56usize;
16770    pub const DEFAULT: Self = Self {
16771        time_usec: 0_u64,
16772        roll: 0.0_f32,
16773        pitch: 0.0_f32,
16774        yaw: 0.0_f32,
16775        rollspeed: 0.0_f32,
16776        pitchspeed: 0.0_f32,
16777        yawspeed: 0.0_f32,
16778        lat: 0_i32,
16779        lon: 0_i32,
16780        alt: 0_i32,
16781        vx: 0_i16,
16782        vy: 0_i16,
16783        vz: 0_i16,
16784        xacc: 0_i16,
16785        yacc: 0_i16,
16786        zacc: 0_i16,
16787    };
16788    #[cfg(feature = "arbitrary")]
16789    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16790        use arbitrary::{Arbitrary, Unstructured};
16791        let mut buf = [0u8; 1024];
16792        rng.fill_bytes(&mut buf);
16793        let mut unstructured = Unstructured::new(&buf);
16794        Self::arbitrary(&mut unstructured).unwrap_or_default()
16795    }
16796}
16797impl Default for HIL_STATE_DATA {
16798    fn default() -> Self {
16799        Self::DEFAULT.clone()
16800    }
16801}
16802impl MessageData for HIL_STATE_DATA {
16803    type Message = MavMessage;
16804    const ID: u32 = 90u32;
16805    const NAME: &'static str = "HIL_STATE";
16806    const EXTRA_CRC: u8 = 183u8;
16807    const ENCODED_LEN: usize = 56usize;
16808    fn deser(
16809        _version: MavlinkVersion,
16810        __input: &[u8],
16811    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16812        let avail_len = __input.len();
16813        let mut payload_buf = [0; Self::ENCODED_LEN];
16814        let mut buf = if avail_len < Self::ENCODED_LEN {
16815            payload_buf[0..avail_len].copy_from_slice(__input);
16816            Bytes::new(&payload_buf)
16817        } else {
16818            Bytes::new(__input)
16819        };
16820        let mut __struct = Self::default();
16821        __struct.time_usec = buf.get_u64_le();
16822        __struct.roll = buf.get_f32_le();
16823        __struct.pitch = buf.get_f32_le();
16824        __struct.yaw = buf.get_f32_le();
16825        __struct.rollspeed = buf.get_f32_le();
16826        __struct.pitchspeed = buf.get_f32_le();
16827        __struct.yawspeed = buf.get_f32_le();
16828        __struct.lat = buf.get_i32_le();
16829        __struct.lon = buf.get_i32_le();
16830        __struct.alt = buf.get_i32_le();
16831        __struct.vx = buf.get_i16_le();
16832        __struct.vy = buf.get_i16_le();
16833        __struct.vz = buf.get_i16_le();
16834        __struct.xacc = buf.get_i16_le();
16835        __struct.yacc = buf.get_i16_le();
16836        __struct.zacc = buf.get_i16_le();
16837        Ok(__struct)
16838    }
16839    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16840        let mut __tmp = BytesMut::new(bytes);
16841        #[allow(clippy::absurd_extreme_comparisons)]
16842        #[allow(unused_comparisons)]
16843        if __tmp.remaining() < Self::ENCODED_LEN {
16844            panic!(
16845                "buffer is too small (need {} bytes, but got {})",
16846                Self::ENCODED_LEN,
16847                __tmp.remaining(),
16848            )
16849        }
16850        __tmp.put_u64_le(self.time_usec);
16851        __tmp.put_f32_le(self.roll);
16852        __tmp.put_f32_le(self.pitch);
16853        __tmp.put_f32_le(self.yaw);
16854        __tmp.put_f32_le(self.rollspeed);
16855        __tmp.put_f32_le(self.pitchspeed);
16856        __tmp.put_f32_le(self.yawspeed);
16857        __tmp.put_i32_le(self.lat);
16858        __tmp.put_i32_le(self.lon);
16859        __tmp.put_i32_le(self.alt);
16860        __tmp.put_i16_le(self.vx);
16861        __tmp.put_i16_le(self.vy);
16862        __tmp.put_i16_le(self.vz);
16863        __tmp.put_i16_le(self.xacc);
16864        __tmp.put_i16_le(self.yacc);
16865        __tmp.put_i16_le(self.zacc);
16866        if matches!(version, MavlinkVersion::V2) {
16867            let len = __tmp.len();
16868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16869        } else {
16870            __tmp.len()
16871        }
16872    }
16873}
16874#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16875#[doc = ""]
16876#[doc = "ID: 115"]
16877#[derive(Debug, Clone, PartialEq)]
16878#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16879#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16880pub struct HIL_STATE_QUATERNION_DATA {
16881    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16882    pub time_usec: u64,
16883    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16884    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16885    pub attitude_quaternion: [f32; 4],
16886    #[doc = "Body frame roll / phi angular speed"]
16887    pub rollspeed: f32,
16888    #[doc = "Body frame pitch / theta angular speed"]
16889    pub pitchspeed: f32,
16890    #[doc = "Body frame yaw / psi angular speed"]
16891    pub yawspeed: f32,
16892    #[doc = "Latitude"]
16893    pub lat: i32,
16894    #[doc = "Longitude"]
16895    pub lon: i32,
16896    #[doc = "Altitude"]
16897    pub alt: i32,
16898    #[doc = "Ground X Speed (Latitude)"]
16899    pub vx: i16,
16900    #[doc = "Ground Y Speed (Longitude)"]
16901    pub vy: i16,
16902    #[doc = "Ground Z Speed (Altitude)"]
16903    pub vz: i16,
16904    #[doc = "Indicated airspeed"]
16905    pub ind_airspeed: u16,
16906    #[doc = "True airspeed"]
16907    pub true_airspeed: u16,
16908    #[doc = "X acceleration"]
16909    pub xacc: i16,
16910    #[doc = "Y acceleration"]
16911    pub yacc: i16,
16912    #[doc = "Z acceleration"]
16913    pub zacc: i16,
16914}
16915impl HIL_STATE_QUATERNION_DATA {
16916    pub const ENCODED_LEN: usize = 64usize;
16917    pub const DEFAULT: Self = Self {
16918        time_usec: 0_u64,
16919        attitude_quaternion: [0.0_f32; 4usize],
16920        rollspeed: 0.0_f32,
16921        pitchspeed: 0.0_f32,
16922        yawspeed: 0.0_f32,
16923        lat: 0_i32,
16924        lon: 0_i32,
16925        alt: 0_i32,
16926        vx: 0_i16,
16927        vy: 0_i16,
16928        vz: 0_i16,
16929        ind_airspeed: 0_u16,
16930        true_airspeed: 0_u16,
16931        xacc: 0_i16,
16932        yacc: 0_i16,
16933        zacc: 0_i16,
16934    };
16935    #[cfg(feature = "arbitrary")]
16936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16937        use arbitrary::{Arbitrary, Unstructured};
16938        let mut buf = [0u8; 1024];
16939        rng.fill_bytes(&mut buf);
16940        let mut unstructured = Unstructured::new(&buf);
16941        Self::arbitrary(&mut unstructured).unwrap_or_default()
16942    }
16943}
16944impl Default for HIL_STATE_QUATERNION_DATA {
16945    fn default() -> Self {
16946        Self::DEFAULT.clone()
16947    }
16948}
16949impl MessageData for HIL_STATE_QUATERNION_DATA {
16950    type Message = MavMessage;
16951    const ID: u32 = 115u32;
16952    const NAME: &'static str = "HIL_STATE_QUATERNION";
16953    const EXTRA_CRC: u8 = 4u8;
16954    const ENCODED_LEN: usize = 64usize;
16955    fn deser(
16956        _version: MavlinkVersion,
16957        __input: &[u8],
16958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16959        let avail_len = __input.len();
16960        let mut payload_buf = [0; Self::ENCODED_LEN];
16961        let mut buf = if avail_len < Self::ENCODED_LEN {
16962            payload_buf[0..avail_len].copy_from_slice(__input);
16963            Bytes::new(&payload_buf)
16964        } else {
16965            Bytes::new(__input)
16966        };
16967        let mut __struct = Self::default();
16968        __struct.time_usec = buf.get_u64_le();
16969        for v in &mut __struct.attitude_quaternion {
16970            let val = buf.get_f32_le();
16971            *v = val;
16972        }
16973        __struct.rollspeed = buf.get_f32_le();
16974        __struct.pitchspeed = buf.get_f32_le();
16975        __struct.yawspeed = buf.get_f32_le();
16976        __struct.lat = buf.get_i32_le();
16977        __struct.lon = buf.get_i32_le();
16978        __struct.alt = buf.get_i32_le();
16979        __struct.vx = buf.get_i16_le();
16980        __struct.vy = buf.get_i16_le();
16981        __struct.vz = buf.get_i16_le();
16982        __struct.ind_airspeed = buf.get_u16_le();
16983        __struct.true_airspeed = buf.get_u16_le();
16984        __struct.xacc = buf.get_i16_le();
16985        __struct.yacc = buf.get_i16_le();
16986        __struct.zacc = buf.get_i16_le();
16987        Ok(__struct)
16988    }
16989    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16990        let mut __tmp = BytesMut::new(bytes);
16991        #[allow(clippy::absurd_extreme_comparisons)]
16992        #[allow(unused_comparisons)]
16993        if __tmp.remaining() < Self::ENCODED_LEN {
16994            panic!(
16995                "buffer is too small (need {} bytes, but got {})",
16996                Self::ENCODED_LEN,
16997                __tmp.remaining(),
16998            )
16999        }
17000        __tmp.put_u64_le(self.time_usec);
17001        for val in &self.attitude_quaternion {
17002            __tmp.put_f32_le(*val);
17003        }
17004        __tmp.put_f32_le(self.rollspeed);
17005        __tmp.put_f32_le(self.pitchspeed);
17006        __tmp.put_f32_le(self.yawspeed);
17007        __tmp.put_i32_le(self.lat);
17008        __tmp.put_i32_le(self.lon);
17009        __tmp.put_i32_le(self.alt);
17010        __tmp.put_i16_le(self.vx);
17011        __tmp.put_i16_le(self.vy);
17012        __tmp.put_i16_le(self.vz);
17013        __tmp.put_u16_le(self.ind_airspeed);
17014        __tmp.put_u16_le(self.true_airspeed);
17015        __tmp.put_i16_le(self.xacc);
17016        __tmp.put_i16_le(self.yacc);
17017        __tmp.put_i16_le(self.zacc);
17018        if matches!(version, MavlinkVersion::V2) {
17019            let len = __tmp.len();
17020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17021        } else {
17022            __tmp.len()
17023        }
17024    }
17025}
17026#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
17027#[doc = ""]
17028#[doc = "ID: 242"]
17029#[derive(Debug, Clone, PartialEq)]
17030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17032pub struct HOME_POSITION_DATA {
17033    #[doc = "Latitude (WGS84)"]
17034    pub latitude: i32,
17035    #[doc = "Longitude (WGS84)"]
17036    pub longitude: i32,
17037    #[doc = "Altitude (MSL). Positive for up."]
17038    pub altitude: i32,
17039    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
17040    pub x: f32,
17041    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
17042    pub y: f32,
17043    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
17044    pub z: f32,
17045    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
17046    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17047    pub q: [f32; 4],
17048    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17049    pub approach_x: f32,
17050    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17051    pub approach_y: f32,
17052    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
17053    pub approach_z: f32,
17054    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17055    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17056    pub time_usec: u64,
17057}
17058impl HOME_POSITION_DATA {
17059    pub const ENCODED_LEN: usize = 60usize;
17060    pub const DEFAULT: Self = Self {
17061        latitude: 0_i32,
17062        longitude: 0_i32,
17063        altitude: 0_i32,
17064        x: 0.0_f32,
17065        y: 0.0_f32,
17066        z: 0.0_f32,
17067        q: [0.0_f32; 4usize],
17068        approach_x: 0.0_f32,
17069        approach_y: 0.0_f32,
17070        approach_z: 0.0_f32,
17071        time_usec: 0_u64,
17072    };
17073    #[cfg(feature = "arbitrary")]
17074    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17075        use arbitrary::{Arbitrary, Unstructured};
17076        let mut buf = [0u8; 1024];
17077        rng.fill_bytes(&mut buf);
17078        let mut unstructured = Unstructured::new(&buf);
17079        Self::arbitrary(&mut unstructured).unwrap_or_default()
17080    }
17081}
17082impl Default for HOME_POSITION_DATA {
17083    fn default() -> Self {
17084        Self::DEFAULT.clone()
17085    }
17086}
17087impl MessageData for HOME_POSITION_DATA {
17088    type Message = MavMessage;
17089    const ID: u32 = 242u32;
17090    const NAME: &'static str = "HOME_POSITION";
17091    const EXTRA_CRC: u8 = 104u8;
17092    const ENCODED_LEN: usize = 60usize;
17093    fn deser(
17094        _version: MavlinkVersion,
17095        __input: &[u8],
17096    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17097        let avail_len = __input.len();
17098        let mut payload_buf = [0; Self::ENCODED_LEN];
17099        let mut buf = if avail_len < Self::ENCODED_LEN {
17100            payload_buf[0..avail_len].copy_from_slice(__input);
17101            Bytes::new(&payload_buf)
17102        } else {
17103            Bytes::new(__input)
17104        };
17105        let mut __struct = Self::default();
17106        __struct.latitude = buf.get_i32_le();
17107        __struct.longitude = buf.get_i32_le();
17108        __struct.altitude = buf.get_i32_le();
17109        __struct.x = buf.get_f32_le();
17110        __struct.y = buf.get_f32_le();
17111        __struct.z = buf.get_f32_le();
17112        for v in &mut __struct.q {
17113            let val = buf.get_f32_le();
17114            *v = val;
17115        }
17116        __struct.approach_x = buf.get_f32_le();
17117        __struct.approach_y = buf.get_f32_le();
17118        __struct.approach_z = buf.get_f32_le();
17119        __struct.time_usec = buf.get_u64_le();
17120        Ok(__struct)
17121    }
17122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17123        let mut __tmp = BytesMut::new(bytes);
17124        #[allow(clippy::absurd_extreme_comparisons)]
17125        #[allow(unused_comparisons)]
17126        if __tmp.remaining() < Self::ENCODED_LEN {
17127            panic!(
17128                "buffer is too small (need {} bytes, but got {})",
17129                Self::ENCODED_LEN,
17130                __tmp.remaining(),
17131            )
17132        }
17133        __tmp.put_i32_le(self.latitude);
17134        __tmp.put_i32_le(self.longitude);
17135        __tmp.put_i32_le(self.altitude);
17136        __tmp.put_f32_le(self.x);
17137        __tmp.put_f32_le(self.y);
17138        __tmp.put_f32_le(self.z);
17139        for val in &self.q {
17140            __tmp.put_f32_le(*val);
17141        }
17142        __tmp.put_f32_le(self.approach_x);
17143        __tmp.put_f32_le(self.approach_y);
17144        __tmp.put_f32_le(self.approach_z);
17145        __tmp.put_u64_le(self.time_usec);
17146        if matches!(version, MavlinkVersion::V2) {
17147            let len = __tmp.len();
17148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17149        } else {
17150            __tmp.len()
17151        }
17152    }
17153}
17154#[doc = "Temperature and humidity from hygrometer."]
17155#[doc = ""]
17156#[doc = "ID: 12920"]
17157#[derive(Debug, Clone, PartialEq)]
17158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17160pub struct HYGROMETER_SENSOR_DATA {
17161    #[doc = "Temperature"]
17162    pub temperature: i16,
17163    #[doc = "Humidity"]
17164    pub humidity: u16,
17165    #[doc = "Hygrometer ID"]
17166    pub id: u8,
17167}
17168impl HYGROMETER_SENSOR_DATA {
17169    pub const ENCODED_LEN: usize = 5usize;
17170    pub const DEFAULT: Self = Self {
17171        temperature: 0_i16,
17172        humidity: 0_u16,
17173        id: 0_u8,
17174    };
17175    #[cfg(feature = "arbitrary")]
17176    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17177        use arbitrary::{Arbitrary, Unstructured};
17178        let mut buf = [0u8; 1024];
17179        rng.fill_bytes(&mut buf);
17180        let mut unstructured = Unstructured::new(&buf);
17181        Self::arbitrary(&mut unstructured).unwrap_or_default()
17182    }
17183}
17184impl Default for HYGROMETER_SENSOR_DATA {
17185    fn default() -> Self {
17186        Self::DEFAULT.clone()
17187    }
17188}
17189impl MessageData for HYGROMETER_SENSOR_DATA {
17190    type Message = MavMessage;
17191    const ID: u32 = 12920u32;
17192    const NAME: &'static str = "HYGROMETER_SENSOR";
17193    const EXTRA_CRC: u8 = 20u8;
17194    const ENCODED_LEN: usize = 5usize;
17195    fn deser(
17196        _version: MavlinkVersion,
17197        __input: &[u8],
17198    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17199        let avail_len = __input.len();
17200        let mut payload_buf = [0; Self::ENCODED_LEN];
17201        let mut buf = if avail_len < Self::ENCODED_LEN {
17202            payload_buf[0..avail_len].copy_from_slice(__input);
17203            Bytes::new(&payload_buf)
17204        } else {
17205            Bytes::new(__input)
17206        };
17207        let mut __struct = Self::default();
17208        __struct.temperature = buf.get_i16_le();
17209        __struct.humidity = buf.get_u16_le();
17210        __struct.id = buf.get_u8();
17211        Ok(__struct)
17212    }
17213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17214        let mut __tmp = BytesMut::new(bytes);
17215        #[allow(clippy::absurd_extreme_comparisons)]
17216        #[allow(unused_comparisons)]
17217        if __tmp.remaining() < Self::ENCODED_LEN {
17218            panic!(
17219                "buffer is too small (need {} bytes, but got {})",
17220                Self::ENCODED_LEN,
17221                __tmp.remaining(),
17222            )
17223        }
17224        __tmp.put_i16_le(self.temperature);
17225        __tmp.put_u16_le(self.humidity);
17226        __tmp.put_u8(self.id);
17227        if matches!(version, MavlinkVersion::V2) {
17228            let len = __tmp.len();
17229            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17230        } else {
17231            __tmp.len()
17232        }
17233    }
17234}
17235#[doc = "Illuminator status."]
17236#[doc = ""]
17237#[doc = "ID: 440"]
17238#[derive(Debug, Clone, PartialEq)]
17239#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17240#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17241pub struct ILLUMINATOR_STATUS_DATA {
17242    #[doc = "Time since the start-up of the illuminator in ms"]
17243    pub uptime_ms: u32,
17244    #[doc = "Errors"]
17245    pub error_status: IlluminatorErrorFlags,
17246    #[doc = "Illuminator brightness"]
17247    pub brightness: f32,
17248    #[doc = "Illuminator strobing period in seconds"]
17249    pub strobe_period: f32,
17250    #[doc = "Illuminator strobing duty cycle"]
17251    pub strobe_duty_cycle: f32,
17252    #[doc = "Temperature in Celsius"]
17253    pub temp_c: f32,
17254    #[doc = "Minimum strobing period in seconds"]
17255    pub min_strobe_period: f32,
17256    #[doc = "Maximum strobing period in seconds"]
17257    pub max_strobe_period: f32,
17258    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
17259    pub enable: u8,
17260    #[doc = "Supported illuminator modes"]
17261    pub mode_bitmask: IlluminatorMode,
17262    #[doc = "Illuminator mode"]
17263    pub mode: IlluminatorMode,
17264}
17265impl ILLUMINATOR_STATUS_DATA {
17266    pub const ENCODED_LEN: usize = 35usize;
17267    pub const DEFAULT: Self = Self {
17268        uptime_ms: 0_u32,
17269        error_status: IlluminatorErrorFlags::DEFAULT,
17270        brightness: 0.0_f32,
17271        strobe_period: 0.0_f32,
17272        strobe_duty_cycle: 0.0_f32,
17273        temp_c: 0.0_f32,
17274        min_strobe_period: 0.0_f32,
17275        max_strobe_period: 0.0_f32,
17276        enable: 0_u8,
17277        mode_bitmask: IlluminatorMode::DEFAULT,
17278        mode: IlluminatorMode::DEFAULT,
17279    };
17280    #[cfg(feature = "arbitrary")]
17281    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17282        use arbitrary::{Arbitrary, Unstructured};
17283        let mut buf = [0u8; 1024];
17284        rng.fill_bytes(&mut buf);
17285        let mut unstructured = Unstructured::new(&buf);
17286        Self::arbitrary(&mut unstructured).unwrap_or_default()
17287    }
17288}
17289impl Default for ILLUMINATOR_STATUS_DATA {
17290    fn default() -> Self {
17291        Self::DEFAULT.clone()
17292    }
17293}
17294impl MessageData for ILLUMINATOR_STATUS_DATA {
17295    type Message = MavMessage;
17296    const ID: u32 = 440u32;
17297    const NAME: &'static str = "ILLUMINATOR_STATUS";
17298    const EXTRA_CRC: u8 = 66u8;
17299    const ENCODED_LEN: usize = 35usize;
17300    fn deser(
17301        _version: MavlinkVersion,
17302        __input: &[u8],
17303    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17304        let avail_len = __input.len();
17305        let mut payload_buf = [0; Self::ENCODED_LEN];
17306        let mut buf = if avail_len < Self::ENCODED_LEN {
17307            payload_buf[0..avail_len].copy_from_slice(__input);
17308            Bytes::new(&payload_buf)
17309        } else {
17310            Bytes::new(__input)
17311        };
17312        let mut __struct = Self::default();
17313        __struct.uptime_ms = buf.get_u32_le();
17314        let tmp = buf.get_u32_le();
17315        __struct.error_status = IlluminatorErrorFlags::from_bits(
17316            tmp & IlluminatorErrorFlags::all().bits(),
17317        )
17318        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
17319            flag_type: "IlluminatorErrorFlags",
17320            value: tmp as u32,
17321        })?;
17322        __struct.brightness = buf.get_f32_le();
17323        __struct.strobe_period = buf.get_f32_le();
17324        __struct.strobe_duty_cycle = buf.get_f32_le();
17325        __struct.temp_c = buf.get_f32_le();
17326        __struct.min_strobe_period = buf.get_f32_le();
17327        __struct.max_strobe_period = buf.get_f32_le();
17328        __struct.enable = buf.get_u8();
17329        let tmp = buf.get_u8();
17330        __struct.mode_bitmask =
17331            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17332                enum_type: "IlluminatorMode",
17333                value: tmp as u32,
17334            })?;
17335        let tmp = buf.get_u8();
17336        __struct.mode =
17337            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17338                enum_type: "IlluminatorMode",
17339                value: tmp as u32,
17340            })?;
17341        Ok(__struct)
17342    }
17343    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17344        let mut __tmp = BytesMut::new(bytes);
17345        #[allow(clippy::absurd_extreme_comparisons)]
17346        #[allow(unused_comparisons)]
17347        if __tmp.remaining() < Self::ENCODED_LEN {
17348            panic!(
17349                "buffer is too small (need {} bytes, but got {})",
17350                Self::ENCODED_LEN,
17351                __tmp.remaining(),
17352            )
17353        }
17354        __tmp.put_u32_le(self.uptime_ms);
17355        __tmp.put_u32_le(self.error_status.bits());
17356        __tmp.put_f32_le(self.brightness);
17357        __tmp.put_f32_le(self.strobe_period);
17358        __tmp.put_f32_le(self.strobe_duty_cycle);
17359        __tmp.put_f32_le(self.temp_c);
17360        __tmp.put_f32_le(self.min_strobe_period);
17361        __tmp.put_f32_le(self.max_strobe_period);
17362        __tmp.put_u8(self.enable);
17363        __tmp.put_u8(self.mode_bitmask as u8);
17364        __tmp.put_u8(self.mode as u8);
17365        if matches!(version, MavlinkVersion::V2) {
17366            let len = __tmp.len();
17367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17368        } else {
17369            __tmp.len()
17370        }
17371    }
17372}
17373#[doc = "Status of the Iridium SBD link."]
17374#[doc = ""]
17375#[doc = "ID: 335"]
17376#[derive(Debug, Clone, PartialEq)]
17377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17379pub struct ISBD_LINK_STATUS_DATA {
17380    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17381    pub timestamp: u64,
17382    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17383    pub last_heartbeat: u64,
17384    #[doc = "Number of failed SBD sessions."]
17385    pub failed_sessions: u16,
17386    #[doc = "Number of successful SBD sessions."]
17387    pub successful_sessions: u16,
17388    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
17389    pub signal_quality: u8,
17390    #[doc = "1: Ring call pending, 0: No call pending."]
17391    pub ring_pending: u8,
17392    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
17393    pub tx_session_pending: u8,
17394    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
17395    pub rx_session_pending: u8,
17396}
17397impl ISBD_LINK_STATUS_DATA {
17398    pub const ENCODED_LEN: usize = 24usize;
17399    pub const DEFAULT: Self = Self {
17400        timestamp: 0_u64,
17401        last_heartbeat: 0_u64,
17402        failed_sessions: 0_u16,
17403        successful_sessions: 0_u16,
17404        signal_quality: 0_u8,
17405        ring_pending: 0_u8,
17406        tx_session_pending: 0_u8,
17407        rx_session_pending: 0_u8,
17408    };
17409    #[cfg(feature = "arbitrary")]
17410    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17411        use arbitrary::{Arbitrary, Unstructured};
17412        let mut buf = [0u8; 1024];
17413        rng.fill_bytes(&mut buf);
17414        let mut unstructured = Unstructured::new(&buf);
17415        Self::arbitrary(&mut unstructured).unwrap_or_default()
17416    }
17417}
17418impl Default for ISBD_LINK_STATUS_DATA {
17419    fn default() -> Self {
17420        Self::DEFAULT.clone()
17421    }
17422}
17423impl MessageData for ISBD_LINK_STATUS_DATA {
17424    type Message = MavMessage;
17425    const ID: u32 = 335u32;
17426    const NAME: &'static str = "ISBD_LINK_STATUS";
17427    const EXTRA_CRC: u8 = 225u8;
17428    const ENCODED_LEN: usize = 24usize;
17429    fn deser(
17430        _version: MavlinkVersion,
17431        __input: &[u8],
17432    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17433        let avail_len = __input.len();
17434        let mut payload_buf = [0; Self::ENCODED_LEN];
17435        let mut buf = if avail_len < Self::ENCODED_LEN {
17436            payload_buf[0..avail_len].copy_from_slice(__input);
17437            Bytes::new(&payload_buf)
17438        } else {
17439            Bytes::new(__input)
17440        };
17441        let mut __struct = Self::default();
17442        __struct.timestamp = buf.get_u64_le();
17443        __struct.last_heartbeat = buf.get_u64_le();
17444        __struct.failed_sessions = buf.get_u16_le();
17445        __struct.successful_sessions = buf.get_u16_le();
17446        __struct.signal_quality = buf.get_u8();
17447        __struct.ring_pending = buf.get_u8();
17448        __struct.tx_session_pending = buf.get_u8();
17449        __struct.rx_session_pending = buf.get_u8();
17450        Ok(__struct)
17451    }
17452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17453        let mut __tmp = BytesMut::new(bytes);
17454        #[allow(clippy::absurd_extreme_comparisons)]
17455        #[allow(unused_comparisons)]
17456        if __tmp.remaining() < Self::ENCODED_LEN {
17457            panic!(
17458                "buffer is too small (need {} bytes, but got {})",
17459                Self::ENCODED_LEN,
17460                __tmp.remaining(),
17461            )
17462        }
17463        __tmp.put_u64_le(self.timestamp);
17464        __tmp.put_u64_le(self.last_heartbeat);
17465        __tmp.put_u16_le(self.failed_sessions);
17466        __tmp.put_u16_le(self.successful_sessions);
17467        __tmp.put_u8(self.signal_quality);
17468        __tmp.put_u8(self.ring_pending);
17469        __tmp.put_u8(self.tx_session_pending);
17470        __tmp.put_u8(self.rx_session_pending);
17471        if matches!(version, MavlinkVersion::V2) {
17472            let len = __tmp.len();
17473            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17474        } else {
17475            __tmp.len()
17476        }
17477    }
17478}
17479#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
17480#[doc = ""]
17481#[doc = "ID: 149"]
17482#[derive(Debug, Clone, PartialEq)]
17483#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17485pub struct LANDING_TARGET_DATA {
17486    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17487    pub time_usec: u64,
17488    #[doc = "X-axis angular offset of the target from the center of the image"]
17489    pub angle_x: f32,
17490    #[doc = "Y-axis angular offset of the target from the center of the image"]
17491    pub angle_y: f32,
17492    #[doc = "Distance to the target from the vehicle"]
17493    pub distance: f32,
17494    #[doc = "Size of target along x-axis"]
17495    pub size_x: f32,
17496    #[doc = "Size of target along y-axis"]
17497    pub size_y: f32,
17498    #[doc = "The ID of the target if multiple targets are present"]
17499    pub target_num: u8,
17500    #[doc = "Coordinate frame used for following fields."]
17501    pub frame: MavFrame,
17502    #[doc = "X Position of the landing target in MAV_FRAME"]
17503    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17504    pub x: f32,
17505    #[doc = "Y Position of the landing target in MAV_FRAME"]
17506    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17507    pub y: f32,
17508    #[doc = "Z Position of the landing target in MAV_FRAME"]
17509    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17510    pub z: f32,
17511    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
17512    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17514    pub q: [f32; 4],
17515    #[doc = "Type of landing target"]
17516    #[cfg_attr(feature = "serde", serde(default))]
17517    pub mavtype: LandingTargetType,
17518    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
17519    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17520    pub position_valid: u8,
17521}
17522impl LANDING_TARGET_DATA {
17523    pub const ENCODED_LEN: usize = 60usize;
17524    pub const DEFAULT: Self = Self {
17525        time_usec: 0_u64,
17526        angle_x: 0.0_f32,
17527        angle_y: 0.0_f32,
17528        distance: 0.0_f32,
17529        size_x: 0.0_f32,
17530        size_y: 0.0_f32,
17531        target_num: 0_u8,
17532        frame: MavFrame::DEFAULT,
17533        x: 0.0_f32,
17534        y: 0.0_f32,
17535        z: 0.0_f32,
17536        q: [0.0_f32; 4usize],
17537        mavtype: LandingTargetType::DEFAULT,
17538        position_valid: 0_u8,
17539    };
17540    #[cfg(feature = "arbitrary")]
17541    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17542        use arbitrary::{Arbitrary, Unstructured};
17543        let mut buf = [0u8; 1024];
17544        rng.fill_bytes(&mut buf);
17545        let mut unstructured = Unstructured::new(&buf);
17546        Self::arbitrary(&mut unstructured).unwrap_or_default()
17547    }
17548}
17549impl Default for LANDING_TARGET_DATA {
17550    fn default() -> Self {
17551        Self::DEFAULT.clone()
17552    }
17553}
17554impl MessageData for LANDING_TARGET_DATA {
17555    type Message = MavMessage;
17556    const ID: u32 = 149u32;
17557    const NAME: &'static str = "LANDING_TARGET";
17558    const EXTRA_CRC: u8 = 200u8;
17559    const ENCODED_LEN: usize = 60usize;
17560    fn deser(
17561        _version: MavlinkVersion,
17562        __input: &[u8],
17563    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17564        let avail_len = __input.len();
17565        let mut payload_buf = [0; Self::ENCODED_LEN];
17566        let mut buf = if avail_len < Self::ENCODED_LEN {
17567            payload_buf[0..avail_len].copy_from_slice(__input);
17568            Bytes::new(&payload_buf)
17569        } else {
17570            Bytes::new(__input)
17571        };
17572        let mut __struct = Self::default();
17573        __struct.time_usec = buf.get_u64_le();
17574        __struct.angle_x = buf.get_f32_le();
17575        __struct.angle_y = buf.get_f32_le();
17576        __struct.distance = buf.get_f32_le();
17577        __struct.size_x = buf.get_f32_le();
17578        __struct.size_y = buf.get_f32_le();
17579        __struct.target_num = buf.get_u8();
17580        let tmp = buf.get_u8();
17581        __struct.frame =
17582            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17583                enum_type: "MavFrame",
17584                value: tmp as u32,
17585            })?;
17586        __struct.x = buf.get_f32_le();
17587        __struct.y = buf.get_f32_le();
17588        __struct.z = buf.get_f32_le();
17589        for v in &mut __struct.q {
17590            let val = buf.get_f32_le();
17591            *v = val;
17592        }
17593        let tmp = buf.get_u8();
17594        __struct.mavtype =
17595            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17596                enum_type: "LandingTargetType",
17597                value: tmp as u32,
17598            })?;
17599        __struct.position_valid = buf.get_u8();
17600        Ok(__struct)
17601    }
17602    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17603        let mut __tmp = BytesMut::new(bytes);
17604        #[allow(clippy::absurd_extreme_comparisons)]
17605        #[allow(unused_comparisons)]
17606        if __tmp.remaining() < Self::ENCODED_LEN {
17607            panic!(
17608                "buffer is too small (need {} bytes, but got {})",
17609                Self::ENCODED_LEN,
17610                __tmp.remaining(),
17611            )
17612        }
17613        __tmp.put_u64_le(self.time_usec);
17614        __tmp.put_f32_le(self.angle_x);
17615        __tmp.put_f32_le(self.angle_y);
17616        __tmp.put_f32_le(self.distance);
17617        __tmp.put_f32_le(self.size_x);
17618        __tmp.put_f32_le(self.size_y);
17619        __tmp.put_u8(self.target_num);
17620        __tmp.put_u8(self.frame as u8);
17621        __tmp.put_f32_le(self.x);
17622        __tmp.put_f32_le(self.y);
17623        __tmp.put_f32_le(self.z);
17624        for val in &self.q {
17625            __tmp.put_f32_le(*val);
17626        }
17627        __tmp.put_u8(self.mavtype as u8);
17628        __tmp.put_u8(self.position_valid);
17629        if matches!(version, MavlinkVersion::V2) {
17630            let len = __tmp.len();
17631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17632        } else {
17633            __tmp.len()
17634        }
17635    }
17636}
17637#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
17638#[doc = ""]
17639#[doc = "ID: 8"]
17640#[derive(Debug, Clone, PartialEq)]
17641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17643pub struct LINK_NODE_STATUS_DATA {
17644    #[doc = "Timestamp (time since system boot)."]
17645    pub timestamp: u64,
17646    #[doc = "Transmit rate"]
17647    pub tx_rate: u32,
17648    #[doc = "Receive rate"]
17649    pub rx_rate: u32,
17650    #[doc = "Messages sent"]
17651    pub messages_sent: u32,
17652    #[doc = "Messages received (estimated from counting seq)"]
17653    pub messages_received: u32,
17654    #[doc = "Messages lost (estimated from counting seq)"]
17655    pub messages_lost: u32,
17656    #[doc = "Number of bytes that could not be parsed correctly."]
17657    pub rx_parse_err: u16,
17658    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17659    pub tx_overflows: u16,
17660    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
17661    pub rx_overflows: u16,
17662    #[doc = "Remaining free transmit buffer space"]
17663    pub tx_buf: u8,
17664    #[doc = "Remaining free receive buffer space"]
17665    pub rx_buf: u8,
17666}
17667impl LINK_NODE_STATUS_DATA {
17668    pub const ENCODED_LEN: usize = 36usize;
17669    pub const DEFAULT: Self = Self {
17670        timestamp: 0_u64,
17671        tx_rate: 0_u32,
17672        rx_rate: 0_u32,
17673        messages_sent: 0_u32,
17674        messages_received: 0_u32,
17675        messages_lost: 0_u32,
17676        rx_parse_err: 0_u16,
17677        tx_overflows: 0_u16,
17678        rx_overflows: 0_u16,
17679        tx_buf: 0_u8,
17680        rx_buf: 0_u8,
17681    };
17682    #[cfg(feature = "arbitrary")]
17683    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17684        use arbitrary::{Arbitrary, Unstructured};
17685        let mut buf = [0u8; 1024];
17686        rng.fill_bytes(&mut buf);
17687        let mut unstructured = Unstructured::new(&buf);
17688        Self::arbitrary(&mut unstructured).unwrap_or_default()
17689    }
17690}
17691impl Default for LINK_NODE_STATUS_DATA {
17692    fn default() -> Self {
17693        Self::DEFAULT.clone()
17694    }
17695}
17696impl MessageData for LINK_NODE_STATUS_DATA {
17697    type Message = MavMessage;
17698    const ID: u32 = 8u32;
17699    const NAME: &'static str = "LINK_NODE_STATUS";
17700    const EXTRA_CRC: u8 = 117u8;
17701    const ENCODED_LEN: usize = 36usize;
17702    fn deser(
17703        _version: MavlinkVersion,
17704        __input: &[u8],
17705    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17706        let avail_len = __input.len();
17707        let mut payload_buf = [0; Self::ENCODED_LEN];
17708        let mut buf = if avail_len < Self::ENCODED_LEN {
17709            payload_buf[0..avail_len].copy_from_slice(__input);
17710            Bytes::new(&payload_buf)
17711        } else {
17712            Bytes::new(__input)
17713        };
17714        let mut __struct = Self::default();
17715        __struct.timestamp = buf.get_u64_le();
17716        __struct.tx_rate = buf.get_u32_le();
17717        __struct.rx_rate = buf.get_u32_le();
17718        __struct.messages_sent = buf.get_u32_le();
17719        __struct.messages_received = buf.get_u32_le();
17720        __struct.messages_lost = buf.get_u32_le();
17721        __struct.rx_parse_err = buf.get_u16_le();
17722        __struct.tx_overflows = buf.get_u16_le();
17723        __struct.rx_overflows = buf.get_u16_le();
17724        __struct.tx_buf = buf.get_u8();
17725        __struct.rx_buf = buf.get_u8();
17726        Ok(__struct)
17727    }
17728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17729        let mut __tmp = BytesMut::new(bytes);
17730        #[allow(clippy::absurd_extreme_comparisons)]
17731        #[allow(unused_comparisons)]
17732        if __tmp.remaining() < Self::ENCODED_LEN {
17733            panic!(
17734                "buffer is too small (need {} bytes, but got {})",
17735                Self::ENCODED_LEN,
17736                __tmp.remaining(),
17737            )
17738        }
17739        __tmp.put_u64_le(self.timestamp);
17740        __tmp.put_u32_le(self.tx_rate);
17741        __tmp.put_u32_le(self.rx_rate);
17742        __tmp.put_u32_le(self.messages_sent);
17743        __tmp.put_u32_le(self.messages_received);
17744        __tmp.put_u32_le(self.messages_lost);
17745        __tmp.put_u16_le(self.rx_parse_err);
17746        __tmp.put_u16_le(self.tx_overflows);
17747        __tmp.put_u16_le(self.rx_overflows);
17748        __tmp.put_u8(self.tx_buf);
17749        __tmp.put_u8(self.rx_buf);
17750        if matches!(version, MavlinkVersion::V2) {
17751            let len = __tmp.len();
17752            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17753        } else {
17754            __tmp.len()
17755        }
17756    }
17757}
17758#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17759#[doc = ""]
17760#[doc = "ID: 32"]
17761#[derive(Debug, Clone, PartialEq)]
17762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17763#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17764pub struct LOCAL_POSITION_NED_DATA {
17765    #[doc = "Timestamp (time since system boot)."]
17766    pub time_boot_ms: u32,
17767    #[doc = "X Position"]
17768    pub x: f32,
17769    #[doc = "Y Position"]
17770    pub y: f32,
17771    #[doc = "Z Position"]
17772    pub z: f32,
17773    #[doc = "X Speed"]
17774    pub vx: f32,
17775    #[doc = "Y Speed"]
17776    pub vy: f32,
17777    #[doc = "Z Speed"]
17778    pub vz: f32,
17779}
17780impl LOCAL_POSITION_NED_DATA {
17781    pub const ENCODED_LEN: usize = 28usize;
17782    pub const DEFAULT: Self = Self {
17783        time_boot_ms: 0_u32,
17784        x: 0.0_f32,
17785        y: 0.0_f32,
17786        z: 0.0_f32,
17787        vx: 0.0_f32,
17788        vy: 0.0_f32,
17789        vz: 0.0_f32,
17790    };
17791    #[cfg(feature = "arbitrary")]
17792    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17793        use arbitrary::{Arbitrary, Unstructured};
17794        let mut buf = [0u8; 1024];
17795        rng.fill_bytes(&mut buf);
17796        let mut unstructured = Unstructured::new(&buf);
17797        Self::arbitrary(&mut unstructured).unwrap_or_default()
17798    }
17799}
17800impl Default for LOCAL_POSITION_NED_DATA {
17801    fn default() -> Self {
17802        Self::DEFAULT.clone()
17803    }
17804}
17805impl MessageData for LOCAL_POSITION_NED_DATA {
17806    type Message = MavMessage;
17807    const ID: u32 = 32u32;
17808    const NAME: &'static str = "LOCAL_POSITION_NED";
17809    const EXTRA_CRC: u8 = 185u8;
17810    const ENCODED_LEN: usize = 28usize;
17811    fn deser(
17812        _version: MavlinkVersion,
17813        __input: &[u8],
17814    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17815        let avail_len = __input.len();
17816        let mut payload_buf = [0; Self::ENCODED_LEN];
17817        let mut buf = if avail_len < Self::ENCODED_LEN {
17818            payload_buf[0..avail_len].copy_from_slice(__input);
17819            Bytes::new(&payload_buf)
17820        } else {
17821            Bytes::new(__input)
17822        };
17823        let mut __struct = Self::default();
17824        __struct.time_boot_ms = buf.get_u32_le();
17825        __struct.x = buf.get_f32_le();
17826        __struct.y = buf.get_f32_le();
17827        __struct.z = buf.get_f32_le();
17828        __struct.vx = buf.get_f32_le();
17829        __struct.vy = buf.get_f32_le();
17830        __struct.vz = buf.get_f32_le();
17831        Ok(__struct)
17832    }
17833    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17834        let mut __tmp = BytesMut::new(bytes);
17835        #[allow(clippy::absurd_extreme_comparisons)]
17836        #[allow(unused_comparisons)]
17837        if __tmp.remaining() < Self::ENCODED_LEN {
17838            panic!(
17839                "buffer is too small (need {} bytes, but got {})",
17840                Self::ENCODED_LEN,
17841                __tmp.remaining(),
17842            )
17843        }
17844        __tmp.put_u32_le(self.time_boot_ms);
17845        __tmp.put_f32_le(self.x);
17846        __tmp.put_f32_le(self.y);
17847        __tmp.put_f32_le(self.z);
17848        __tmp.put_f32_le(self.vx);
17849        __tmp.put_f32_le(self.vy);
17850        __tmp.put_f32_le(self.vz);
17851        if matches!(version, MavlinkVersion::V2) {
17852            let len = __tmp.len();
17853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17854        } else {
17855            __tmp.len()
17856        }
17857    }
17858}
17859#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17860#[doc = ""]
17861#[doc = "ID: 64"]
17862#[derive(Debug, Clone, PartialEq)]
17863#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17865pub struct LOCAL_POSITION_NED_COV_DATA {
17866    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17867    pub time_usec: u64,
17868    #[doc = "X Position"]
17869    pub x: f32,
17870    #[doc = "Y Position"]
17871    pub y: f32,
17872    #[doc = "Z Position"]
17873    pub z: f32,
17874    #[doc = "X Speed"]
17875    pub vx: f32,
17876    #[doc = "Y Speed"]
17877    pub vy: f32,
17878    #[doc = "Z Speed"]
17879    pub vz: f32,
17880    #[doc = "X Acceleration"]
17881    pub ax: f32,
17882    #[doc = "Y Acceleration"]
17883    pub ay: f32,
17884    #[doc = "Z Acceleration"]
17885    pub az: f32,
17886    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17887    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17888    pub covariance: [f32; 45],
17889    #[doc = "Class id of the estimator this estimate originated from."]
17890    pub estimator_type: MavEstimatorType,
17891}
17892impl LOCAL_POSITION_NED_COV_DATA {
17893    pub const ENCODED_LEN: usize = 225usize;
17894    pub const DEFAULT: Self = Self {
17895        time_usec: 0_u64,
17896        x: 0.0_f32,
17897        y: 0.0_f32,
17898        z: 0.0_f32,
17899        vx: 0.0_f32,
17900        vy: 0.0_f32,
17901        vz: 0.0_f32,
17902        ax: 0.0_f32,
17903        ay: 0.0_f32,
17904        az: 0.0_f32,
17905        covariance: [0.0_f32; 45usize],
17906        estimator_type: MavEstimatorType::DEFAULT,
17907    };
17908    #[cfg(feature = "arbitrary")]
17909    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17910        use arbitrary::{Arbitrary, Unstructured};
17911        let mut buf = [0u8; 1024];
17912        rng.fill_bytes(&mut buf);
17913        let mut unstructured = Unstructured::new(&buf);
17914        Self::arbitrary(&mut unstructured).unwrap_or_default()
17915    }
17916}
17917impl Default for LOCAL_POSITION_NED_COV_DATA {
17918    fn default() -> Self {
17919        Self::DEFAULT.clone()
17920    }
17921}
17922impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17923    type Message = MavMessage;
17924    const ID: u32 = 64u32;
17925    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17926    const EXTRA_CRC: u8 = 191u8;
17927    const ENCODED_LEN: usize = 225usize;
17928    fn deser(
17929        _version: MavlinkVersion,
17930        __input: &[u8],
17931    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17932        let avail_len = __input.len();
17933        let mut payload_buf = [0; Self::ENCODED_LEN];
17934        let mut buf = if avail_len < Self::ENCODED_LEN {
17935            payload_buf[0..avail_len].copy_from_slice(__input);
17936            Bytes::new(&payload_buf)
17937        } else {
17938            Bytes::new(__input)
17939        };
17940        let mut __struct = Self::default();
17941        __struct.time_usec = buf.get_u64_le();
17942        __struct.x = buf.get_f32_le();
17943        __struct.y = buf.get_f32_le();
17944        __struct.z = buf.get_f32_le();
17945        __struct.vx = buf.get_f32_le();
17946        __struct.vy = buf.get_f32_le();
17947        __struct.vz = buf.get_f32_le();
17948        __struct.ax = buf.get_f32_le();
17949        __struct.ay = buf.get_f32_le();
17950        __struct.az = buf.get_f32_le();
17951        for v in &mut __struct.covariance {
17952            let val = buf.get_f32_le();
17953            *v = val;
17954        }
17955        let tmp = buf.get_u8();
17956        __struct.estimator_type =
17957            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17958                enum_type: "MavEstimatorType",
17959                value: tmp as u32,
17960            })?;
17961        Ok(__struct)
17962    }
17963    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17964        let mut __tmp = BytesMut::new(bytes);
17965        #[allow(clippy::absurd_extreme_comparisons)]
17966        #[allow(unused_comparisons)]
17967        if __tmp.remaining() < Self::ENCODED_LEN {
17968            panic!(
17969                "buffer is too small (need {} bytes, but got {})",
17970                Self::ENCODED_LEN,
17971                __tmp.remaining(),
17972            )
17973        }
17974        __tmp.put_u64_le(self.time_usec);
17975        __tmp.put_f32_le(self.x);
17976        __tmp.put_f32_le(self.y);
17977        __tmp.put_f32_le(self.z);
17978        __tmp.put_f32_le(self.vx);
17979        __tmp.put_f32_le(self.vy);
17980        __tmp.put_f32_le(self.vz);
17981        __tmp.put_f32_le(self.ax);
17982        __tmp.put_f32_le(self.ay);
17983        __tmp.put_f32_le(self.az);
17984        for val in &self.covariance {
17985            __tmp.put_f32_le(*val);
17986        }
17987        __tmp.put_u8(self.estimator_type as u8);
17988        if matches!(version, MavlinkVersion::V2) {
17989            let len = __tmp.len();
17990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17991        } else {
17992            __tmp.len()
17993        }
17994    }
17995}
17996#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17997#[doc = ""]
17998#[doc = "ID: 89"]
17999#[derive(Debug, Clone, PartialEq)]
18000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18002pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18003    #[doc = "Timestamp (time since system boot)."]
18004    pub time_boot_ms: u32,
18005    #[doc = "X Position"]
18006    pub x: f32,
18007    #[doc = "Y Position"]
18008    pub y: f32,
18009    #[doc = "Z Position"]
18010    pub z: f32,
18011    #[doc = "Roll"]
18012    pub roll: f32,
18013    #[doc = "Pitch"]
18014    pub pitch: f32,
18015    #[doc = "Yaw"]
18016    pub yaw: f32,
18017}
18018impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18019    pub const ENCODED_LEN: usize = 28usize;
18020    pub const DEFAULT: Self = Self {
18021        time_boot_ms: 0_u32,
18022        x: 0.0_f32,
18023        y: 0.0_f32,
18024        z: 0.0_f32,
18025        roll: 0.0_f32,
18026        pitch: 0.0_f32,
18027        yaw: 0.0_f32,
18028    };
18029    #[cfg(feature = "arbitrary")]
18030    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18031        use arbitrary::{Arbitrary, Unstructured};
18032        let mut buf = [0u8; 1024];
18033        rng.fill_bytes(&mut buf);
18034        let mut unstructured = Unstructured::new(&buf);
18035        Self::arbitrary(&mut unstructured).unwrap_or_default()
18036    }
18037}
18038impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18039    fn default() -> Self {
18040        Self::DEFAULT.clone()
18041    }
18042}
18043impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
18044    type Message = MavMessage;
18045    const ID: u32 = 89u32;
18046    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
18047    const EXTRA_CRC: u8 = 231u8;
18048    const ENCODED_LEN: usize = 28usize;
18049    fn deser(
18050        _version: MavlinkVersion,
18051        __input: &[u8],
18052    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18053        let avail_len = __input.len();
18054        let mut payload_buf = [0; Self::ENCODED_LEN];
18055        let mut buf = if avail_len < Self::ENCODED_LEN {
18056            payload_buf[0..avail_len].copy_from_slice(__input);
18057            Bytes::new(&payload_buf)
18058        } else {
18059            Bytes::new(__input)
18060        };
18061        let mut __struct = Self::default();
18062        __struct.time_boot_ms = buf.get_u32_le();
18063        __struct.x = buf.get_f32_le();
18064        __struct.y = buf.get_f32_le();
18065        __struct.z = buf.get_f32_le();
18066        __struct.roll = buf.get_f32_le();
18067        __struct.pitch = buf.get_f32_le();
18068        __struct.yaw = buf.get_f32_le();
18069        Ok(__struct)
18070    }
18071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18072        let mut __tmp = BytesMut::new(bytes);
18073        #[allow(clippy::absurd_extreme_comparisons)]
18074        #[allow(unused_comparisons)]
18075        if __tmp.remaining() < Self::ENCODED_LEN {
18076            panic!(
18077                "buffer is too small (need {} bytes, but got {})",
18078                Self::ENCODED_LEN,
18079                __tmp.remaining(),
18080            )
18081        }
18082        __tmp.put_u32_le(self.time_boot_ms);
18083        __tmp.put_f32_le(self.x);
18084        __tmp.put_f32_le(self.y);
18085        __tmp.put_f32_le(self.z);
18086        __tmp.put_f32_le(self.roll);
18087        __tmp.put_f32_le(self.pitch);
18088        __tmp.put_f32_le(self.yaw);
18089        if matches!(version, MavlinkVersion::V2) {
18090            let len = __tmp.len();
18091            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18092        } else {
18093            __tmp.len()
18094        }
18095    }
18096}
18097#[doc = "An ack for a LOGGING_DATA_ACKED message."]
18098#[doc = ""]
18099#[doc = "ID: 268"]
18100#[derive(Debug, Clone, PartialEq)]
18101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18103pub struct LOGGING_ACK_DATA {
18104    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
18105    pub sequence: u16,
18106    #[doc = "system ID of the target"]
18107    pub target_system: u8,
18108    #[doc = "component ID of the target"]
18109    pub target_component: u8,
18110}
18111impl LOGGING_ACK_DATA {
18112    pub const ENCODED_LEN: usize = 4usize;
18113    pub const DEFAULT: Self = Self {
18114        sequence: 0_u16,
18115        target_system: 0_u8,
18116        target_component: 0_u8,
18117    };
18118    #[cfg(feature = "arbitrary")]
18119    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18120        use arbitrary::{Arbitrary, Unstructured};
18121        let mut buf = [0u8; 1024];
18122        rng.fill_bytes(&mut buf);
18123        let mut unstructured = Unstructured::new(&buf);
18124        Self::arbitrary(&mut unstructured).unwrap_or_default()
18125    }
18126}
18127impl Default for LOGGING_ACK_DATA {
18128    fn default() -> Self {
18129        Self::DEFAULT.clone()
18130    }
18131}
18132impl MessageData for LOGGING_ACK_DATA {
18133    type Message = MavMessage;
18134    const ID: u32 = 268u32;
18135    const NAME: &'static str = "LOGGING_ACK";
18136    const EXTRA_CRC: u8 = 14u8;
18137    const ENCODED_LEN: usize = 4usize;
18138    fn deser(
18139        _version: MavlinkVersion,
18140        __input: &[u8],
18141    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18142        let avail_len = __input.len();
18143        let mut payload_buf = [0; Self::ENCODED_LEN];
18144        let mut buf = if avail_len < Self::ENCODED_LEN {
18145            payload_buf[0..avail_len].copy_from_slice(__input);
18146            Bytes::new(&payload_buf)
18147        } else {
18148            Bytes::new(__input)
18149        };
18150        let mut __struct = Self::default();
18151        __struct.sequence = buf.get_u16_le();
18152        __struct.target_system = buf.get_u8();
18153        __struct.target_component = buf.get_u8();
18154        Ok(__struct)
18155    }
18156    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18157        let mut __tmp = BytesMut::new(bytes);
18158        #[allow(clippy::absurd_extreme_comparisons)]
18159        #[allow(unused_comparisons)]
18160        if __tmp.remaining() < Self::ENCODED_LEN {
18161            panic!(
18162                "buffer is too small (need {} bytes, but got {})",
18163                Self::ENCODED_LEN,
18164                __tmp.remaining(),
18165            )
18166        }
18167        __tmp.put_u16_le(self.sequence);
18168        __tmp.put_u8(self.target_system);
18169        __tmp.put_u8(self.target_component);
18170        if matches!(version, MavlinkVersion::V2) {
18171            let len = __tmp.len();
18172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18173        } else {
18174            __tmp.len()
18175        }
18176    }
18177}
18178#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
18179#[doc = ""]
18180#[doc = "ID: 266"]
18181#[derive(Debug, Clone, PartialEq)]
18182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18184pub struct LOGGING_DATA_DATA {
18185    #[doc = "sequence number (can wrap)"]
18186    pub sequence: u16,
18187    #[doc = "system ID of the target"]
18188    pub target_system: u8,
18189    #[doc = "component ID of the target"]
18190    pub target_component: u8,
18191    #[doc = "data length"]
18192    pub length: u8,
18193    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18194    pub first_message_offset: u8,
18195    #[doc = "logged data"]
18196    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18197    pub data: [u8; 249],
18198}
18199impl LOGGING_DATA_DATA {
18200    pub const ENCODED_LEN: usize = 255usize;
18201    pub const DEFAULT: Self = Self {
18202        sequence: 0_u16,
18203        target_system: 0_u8,
18204        target_component: 0_u8,
18205        length: 0_u8,
18206        first_message_offset: 0_u8,
18207        data: [0_u8; 249usize],
18208    };
18209    #[cfg(feature = "arbitrary")]
18210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18211        use arbitrary::{Arbitrary, Unstructured};
18212        let mut buf = [0u8; 1024];
18213        rng.fill_bytes(&mut buf);
18214        let mut unstructured = Unstructured::new(&buf);
18215        Self::arbitrary(&mut unstructured).unwrap_or_default()
18216    }
18217}
18218impl Default for LOGGING_DATA_DATA {
18219    fn default() -> Self {
18220        Self::DEFAULT.clone()
18221    }
18222}
18223impl MessageData for LOGGING_DATA_DATA {
18224    type Message = MavMessage;
18225    const ID: u32 = 266u32;
18226    const NAME: &'static str = "LOGGING_DATA";
18227    const EXTRA_CRC: u8 = 193u8;
18228    const ENCODED_LEN: usize = 255usize;
18229    fn deser(
18230        _version: MavlinkVersion,
18231        __input: &[u8],
18232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18233        let avail_len = __input.len();
18234        let mut payload_buf = [0; Self::ENCODED_LEN];
18235        let mut buf = if avail_len < Self::ENCODED_LEN {
18236            payload_buf[0..avail_len].copy_from_slice(__input);
18237            Bytes::new(&payload_buf)
18238        } else {
18239            Bytes::new(__input)
18240        };
18241        let mut __struct = Self::default();
18242        __struct.sequence = buf.get_u16_le();
18243        __struct.target_system = buf.get_u8();
18244        __struct.target_component = buf.get_u8();
18245        __struct.length = buf.get_u8();
18246        __struct.first_message_offset = buf.get_u8();
18247        for v in &mut __struct.data {
18248            let val = buf.get_u8();
18249            *v = val;
18250        }
18251        Ok(__struct)
18252    }
18253    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18254        let mut __tmp = BytesMut::new(bytes);
18255        #[allow(clippy::absurd_extreme_comparisons)]
18256        #[allow(unused_comparisons)]
18257        if __tmp.remaining() < Self::ENCODED_LEN {
18258            panic!(
18259                "buffer is too small (need {} bytes, but got {})",
18260                Self::ENCODED_LEN,
18261                __tmp.remaining(),
18262            )
18263        }
18264        __tmp.put_u16_le(self.sequence);
18265        __tmp.put_u8(self.target_system);
18266        __tmp.put_u8(self.target_component);
18267        __tmp.put_u8(self.length);
18268        __tmp.put_u8(self.first_message_offset);
18269        for val in &self.data {
18270            __tmp.put_u8(*val);
18271        }
18272        if matches!(version, MavlinkVersion::V2) {
18273            let len = __tmp.len();
18274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18275        } else {
18276            __tmp.len()
18277        }
18278    }
18279}
18280#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
18281#[doc = ""]
18282#[doc = "ID: 267"]
18283#[derive(Debug, Clone, PartialEq)]
18284#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18285#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18286pub struct LOGGING_DATA_ACKED_DATA {
18287    #[doc = "sequence number (can wrap)"]
18288    pub sequence: u16,
18289    #[doc = "system ID of the target"]
18290    pub target_system: u8,
18291    #[doc = "component ID of the target"]
18292    pub target_component: u8,
18293    #[doc = "data length"]
18294    pub length: u8,
18295    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
18296    pub first_message_offset: u8,
18297    #[doc = "logged data"]
18298    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18299    pub data: [u8; 249],
18300}
18301impl LOGGING_DATA_ACKED_DATA {
18302    pub const ENCODED_LEN: usize = 255usize;
18303    pub const DEFAULT: Self = Self {
18304        sequence: 0_u16,
18305        target_system: 0_u8,
18306        target_component: 0_u8,
18307        length: 0_u8,
18308        first_message_offset: 0_u8,
18309        data: [0_u8; 249usize],
18310    };
18311    #[cfg(feature = "arbitrary")]
18312    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18313        use arbitrary::{Arbitrary, Unstructured};
18314        let mut buf = [0u8; 1024];
18315        rng.fill_bytes(&mut buf);
18316        let mut unstructured = Unstructured::new(&buf);
18317        Self::arbitrary(&mut unstructured).unwrap_or_default()
18318    }
18319}
18320impl Default for LOGGING_DATA_ACKED_DATA {
18321    fn default() -> Self {
18322        Self::DEFAULT.clone()
18323    }
18324}
18325impl MessageData for LOGGING_DATA_ACKED_DATA {
18326    type Message = MavMessage;
18327    const ID: u32 = 267u32;
18328    const NAME: &'static str = "LOGGING_DATA_ACKED";
18329    const EXTRA_CRC: u8 = 35u8;
18330    const ENCODED_LEN: usize = 255usize;
18331    fn deser(
18332        _version: MavlinkVersion,
18333        __input: &[u8],
18334    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18335        let avail_len = __input.len();
18336        let mut payload_buf = [0; Self::ENCODED_LEN];
18337        let mut buf = if avail_len < Self::ENCODED_LEN {
18338            payload_buf[0..avail_len].copy_from_slice(__input);
18339            Bytes::new(&payload_buf)
18340        } else {
18341            Bytes::new(__input)
18342        };
18343        let mut __struct = Self::default();
18344        __struct.sequence = buf.get_u16_le();
18345        __struct.target_system = buf.get_u8();
18346        __struct.target_component = buf.get_u8();
18347        __struct.length = buf.get_u8();
18348        __struct.first_message_offset = buf.get_u8();
18349        for v in &mut __struct.data {
18350            let val = buf.get_u8();
18351            *v = val;
18352        }
18353        Ok(__struct)
18354    }
18355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18356        let mut __tmp = BytesMut::new(bytes);
18357        #[allow(clippy::absurd_extreme_comparisons)]
18358        #[allow(unused_comparisons)]
18359        if __tmp.remaining() < Self::ENCODED_LEN {
18360            panic!(
18361                "buffer is too small (need {} bytes, but got {})",
18362                Self::ENCODED_LEN,
18363                __tmp.remaining(),
18364            )
18365        }
18366        __tmp.put_u16_le(self.sequence);
18367        __tmp.put_u8(self.target_system);
18368        __tmp.put_u8(self.target_component);
18369        __tmp.put_u8(self.length);
18370        __tmp.put_u8(self.first_message_offset);
18371        for val in &self.data {
18372            __tmp.put_u8(*val);
18373        }
18374        if matches!(version, MavlinkVersion::V2) {
18375            let len = __tmp.len();
18376            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18377        } else {
18378            __tmp.len()
18379        }
18380    }
18381}
18382#[doc = "Reply to LOG_REQUEST_DATA."]
18383#[doc = ""]
18384#[doc = "ID: 120"]
18385#[derive(Debug, Clone, PartialEq)]
18386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18388pub struct LOG_DATA_DATA {
18389    #[doc = "Offset into the log"]
18390    pub ofs: u32,
18391    #[doc = "Log id (from LOG_ENTRY reply)"]
18392    pub id: u16,
18393    #[doc = "Number of bytes (zero for end of log)"]
18394    pub count: u8,
18395    #[doc = "log data"]
18396    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18397    pub data: [u8; 90],
18398}
18399impl LOG_DATA_DATA {
18400    pub const ENCODED_LEN: usize = 97usize;
18401    pub const DEFAULT: Self = Self {
18402        ofs: 0_u32,
18403        id: 0_u16,
18404        count: 0_u8,
18405        data: [0_u8; 90usize],
18406    };
18407    #[cfg(feature = "arbitrary")]
18408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18409        use arbitrary::{Arbitrary, Unstructured};
18410        let mut buf = [0u8; 1024];
18411        rng.fill_bytes(&mut buf);
18412        let mut unstructured = Unstructured::new(&buf);
18413        Self::arbitrary(&mut unstructured).unwrap_or_default()
18414    }
18415}
18416impl Default for LOG_DATA_DATA {
18417    fn default() -> Self {
18418        Self::DEFAULT.clone()
18419    }
18420}
18421impl MessageData for LOG_DATA_DATA {
18422    type Message = MavMessage;
18423    const ID: u32 = 120u32;
18424    const NAME: &'static str = "LOG_DATA";
18425    const EXTRA_CRC: u8 = 134u8;
18426    const ENCODED_LEN: usize = 97usize;
18427    fn deser(
18428        _version: MavlinkVersion,
18429        __input: &[u8],
18430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18431        let avail_len = __input.len();
18432        let mut payload_buf = [0; Self::ENCODED_LEN];
18433        let mut buf = if avail_len < Self::ENCODED_LEN {
18434            payload_buf[0..avail_len].copy_from_slice(__input);
18435            Bytes::new(&payload_buf)
18436        } else {
18437            Bytes::new(__input)
18438        };
18439        let mut __struct = Self::default();
18440        __struct.ofs = buf.get_u32_le();
18441        __struct.id = buf.get_u16_le();
18442        __struct.count = buf.get_u8();
18443        for v in &mut __struct.data {
18444            let val = buf.get_u8();
18445            *v = val;
18446        }
18447        Ok(__struct)
18448    }
18449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18450        let mut __tmp = BytesMut::new(bytes);
18451        #[allow(clippy::absurd_extreme_comparisons)]
18452        #[allow(unused_comparisons)]
18453        if __tmp.remaining() < Self::ENCODED_LEN {
18454            panic!(
18455                "buffer is too small (need {} bytes, but got {})",
18456                Self::ENCODED_LEN,
18457                __tmp.remaining(),
18458            )
18459        }
18460        __tmp.put_u32_le(self.ofs);
18461        __tmp.put_u16_le(self.id);
18462        __tmp.put_u8(self.count);
18463        for val in &self.data {
18464            __tmp.put_u8(*val);
18465        }
18466        if matches!(version, MavlinkVersion::V2) {
18467            let len = __tmp.len();
18468            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18469        } else {
18470            __tmp.len()
18471        }
18472    }
18473}
18474#[doc = "Reply to LOG_REQUEST_LIST."]
18475#[doc = ""]
18476#[doc = "ID: 118"]
18477#[derive(Debug, Clone, PartialEq)]
18478#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18479#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18480pub struct LOG_ENTRY_DATA {
18481    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
18482    pub time_utc: u32,
18483    #[doc = "Size of the log (may be approximate)"]
18484    pub size: u32,
18485    #[doc = "Log id"]
18486    pub id: u16,
18487    #[doc = "Total number of logs"]
18488    pub num_logs: u16,
18489    #[doc = "High log number"]
18490    pub last_log_num: u16,
18491}
18492impl LOG_ENTRY_DATA {
18493    pub const ENCODED_LEN: usize = 14usize;
18494    pub const DEFAULT: Self = Self {
18495        time_utc: 0_u32,
18496        size: 0_u32,
18497        id: 0_u16,
18498        num_logs: 0_u16,
18499        last_log_num: 0_u16,
18500    };
18501    #[cfg(feature = "arbitrary")]
18502    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18503        use arbitrary::{Arbitrary, Unstructured};
18504        let mut buf = [0u8; 1024];
18505        rng.fill_bytes(&mut buf);
18506        let mut unstructured = Unstructured::new(&buf);
18507        Self::arbitrary(&mut unstructured).unwrap_or_default()
18508    }
18509}
18510impl Default for LOG_ENTRY_DATA {
18511    fn default() -> Self {
18512        Self::DEFAULT.clone()
18513    }
18514}
18515impl MessageData for LOG_ENTRY_DATA {
18516    type Message = MavMessage;
18517    const ID: u32 = 118u32;
18518    const NAME: &'static str = "LOG_ENTRY";
18519    const EXTRA_CRC: u8 = 56u8;
18520    const ENCODED_LEN: usize = 14usize;
18521    fn deser(
18522        _version: MavlinkVersion,
18523        __input: &[u8],
18524    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18525        let avail_len = __input.len();
18526        let mut payload_buf = [0; Self::ENCODED_LEN];
18527        let mut buf = if avail_len < Self::ENCODED_LEN {
18528            payload_buf[0..avail_len].copy_from_slice(__input);
18529            Bytes::new(&payload_buf)
18530        } else {
18531            Bytes::new(__input)
18532        };
18533        let mut __struct = Self::default();
18534        __struct.time_utc = buf.get_u32_le();
18535        __struct.size = buf.get_u32_le();
18536        __struct.id = buf.get_u16_le();
18537        __struct.num_logs = buf.get_u16_le();
18538        __struct.last_log_num = buf.get_u16_le();
18539        Ok(__struct)
18540    }
18541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18542        let mut __tmp = BytesMut::new(bytes);
18543        #[allow(clippy::absurd_extreme_comparisons)]
18544        #[allow(unused_comparisons)]
18545        if __tmp.remaining() < Self::ENCODED_LEN {
18546            panic!(
18547                "buffer is too small (need {} bytes, but got {})",
18548                Self::ENCODED_LEN,
18549                __tmp.remaining(),
18550            )
18551        }
18552        __tmp.put_u32_le(self.time_utc);
18553        __tmp.put_u32_le(self.size);
18554        __tmp.put_u16_le(self.id);
18555        __tmp.put_u16_le(self.num_logs);
18556        __tmp.put_u16_le(self.last_log_num);
18557        if matches!(version, MavlinkVersion::V2) {
18558            let len = __tmp.len();
18559            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18560        } else {
18561            __tmp.len()
18562        }
18563    }
18564}
18565#[doc = "Erase all logs."]
18566#[doc = ""]
18567#[doc = "ID: 121"]
18568#[derive(Debug, Clone, PartialEq)]
18569#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18570#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18571pub struct LOG_ERASE_DATA {
18572    #[doc = "System ID"]
18573    pub target_system: u8,
18574    #[doc = "Component ID"]
18575    pub target_component: u8,
18576}
18577impl LOG_ERASE_DATA {
18578    pub const ENCODED_LEN: usize = 2usize;
18579    pub const DEFAULT: Self = Self {
18580        target_system: 0_u8,
18581        target_component: 0_u8,
18582    };
18583    #[cfg(feature = "arbitrary")]
18584    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18585        use arbitrary::{Arbitrary, Unstructured};
18586        let mut buf = [0u8; 1024];
18587        rng.fill_bytes(&mut buf);
18588        let mut unstructured = Unstructured::new(&buf);
18589        Self::arbitrary(&mut unstructured).unwrap_or_default()
18590    }
18591}
18592impl Default for LOG_ERASE_DATA {
18593    fn default() -> Self {
18594        Self::DEFAULT.clone()
18595    }
18596}
18597impl MessageData for LOG_ERASE_DATA {
18598    type Message = MavMessage;
18599    const ID: u32 = 121u32;
18600    const NAME: &'static str = "LOG_ERASE";
18601    const EXTRA_CRC: u8 = 237u8;
18602    const ENCODED_LEN: usize = 2usize;
18603    fn deser(
18604        _version: MavlinkVersion,
18605        __input: &[u8],
18606    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18607        let avail_len = __input.len();
18608        let mut payload_buf = [0; Self::ENCODED_LEN];
18609        let mut buf = if avail_len < Self::ENCODED_LEN {
18610            payload_buf[0..avail_len].copy_from_slice(__input);
18611            Bytes::new(&payload_buf)
18612        } else {
18613            Bytes::new(__input)
18614        };
18615        let mut __struct = Self::default();
18616        __struct.target_system = buf.get_u8();
18617        __struct.target_component = buf.get_u8();
18618        Ok(__struct)
18619    }
18620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18621        let mut __tmp = BytesMut::new(bytes);
18622        #[allow(clippy::absurd_extreme_comparisons)]
18623        #[allow(unused_comparisons)]
18624        if __tmp.remaining() < Self::ENCODED_LEN {
18625            panic!(
18626                "buffer is too small (need {} bytes, but got {})",
18627                Self::ENCODED_LEN,
18628                __tmp.remaining(),
18629            )
18630        }
18631        __tmp.put_u8(self.target_system);
18632        __tmp.put_u8(self.target_component);
18633        if matches!(version, MavlinkVersion::V2) {
18634            let len = __tmp.len();
18635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18636        } else {
18637            __tmp.len()
18638        }
18639    }
18640}
18641#[doc = "Request a chunk of a log."]
18642#[doc = ""]
18643#[doc = "ID: 119"]
18644#[derive(Debug, Clone, PartialEq)]
18645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18647pub struct LOG_REQUEST_DATA_DATA {
18648    #[doc = "Offset into the log"]
18649    pub ofs: u32,
18650    #[doc = "Number of bytes"]
18651    pub count: u32,
18652    #[doc = "Log id (from LOG_ENTRY reply)"]
18653    pub id: u16,
18654    #[doc = "System ID"]
18655    pub target_system: u8,
18656    #[doc = "Component ID"]
18657    pub target_component: u8,
18658}
18659impl LOG_REQUEST_DATA_DATA {
18660    pub const ENCODED_LEN: usize = 12usize;
18661    pub const DEFAULT: Self = Self {
18662        ofs: 0_u32,
18663        count: 0_u32,
18664        id: 0_u16,
18665        target_system: 0_u8,
18666        target_component: 0_u8,
18667    };
18668    #[cfg(feature = "arbitrary")]
18669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18670        use arbitrary::{Arbitrary, Unstructured};
18671        let mut buf = [0u8; 1024];
18672        rng.fill_bytes(&mut buf);
18673        let mut unstructured = Unstructured::new(&buf);
18674        Self::arbitrary(&mut unstructured).unwrap_or_default()
18675    }
18676}
18677impl Default for LOG_REQUEST_DATA_DATA {
18678    fn default() -> Self {
18679        Self::DEFAULT.clone()
18680    }
18681}
18682impl MessageData for LOG_REQUEST_DATA_DATA {
18683    type Message = MavMessage;
18684    const ID: u32 = 119u32;
18685    const NAME: &'static str = "LOG_REQUEST_DATA";
18686    const EXTRA_CRC: u8 = 116u8;
18687    const ENCODED_LEN: usize = 12usize;
18688    fn deser(
18689        _version: MavlinkVersion,
18690        __input: &[u8],
18691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18692        let avail_len = __input.len();
18693        let mut payload_buf = [0; Self::ENCODED_LEN];
18694        let mut buf = if avail_len < Self::ENCODED_LEN {
18695            payload_buf[0..avail_len].copy_from_slice(__input);
18696            Bytes::new(&payload_buf)
18697        } else {
18698            Bytes::new(__input)
18699        };
18700        let mut __struct = Self::default();
18701        __struct.ofs = buf.get_u32_le();
18702        __struct.count = buf.get_u32_le();
18703        __struct.id = buf.get_u16_le();
18704        __struct.target_system = buf.get_u8();
18705        __struct.target_component = buf.get_u8();
18706        Ok(__struct)
18707    }
18708    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18709        let mut __tmp = BytesMut::new(bytes);
18710        #[allow(clippy::absurd_extreme_comparisons)]
18711        #[allow(unused_comparisons)]
18712        if __tmp.remaining() < Self::ENCODED_LEN {
18713            panic!(
18714                "buffer is too small (need {} bytes, but got {})",
18715                Self::ENCODED_LEN,
18716                __tmp.remaining(),
18717            )
18718        }
18719        __tmp.put_u32_le(self.ofs);
18720        __tmp.put_u32_le(self.count);
18721        __tmp.put_u16_le(self.id);
18722        __tmp.put_u8(self.target_system);
18723        __tmp.put_u8(self.target_component);
18724        if matches!(version, MavlinkVersion::V2) {
18725            let len = __tmp.len();
18726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18727        } else {
18728            __tmp.len()
18729        }
18730    }
18731}
18732#[doc = "Stop log transfer and resume normal logging."]
18733#[doc = ""]
18734#[doc = "ID: 122"]
18735#[derive(Debug, Clone, PartialEq)]
18736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18738pub struct LOG_REQUEST_END_DATA {
18739    #[doc = "System ID"]
18740    pub target_system: u8,
18741    #[doc = "Component ID"]
18742    pub target_component: u8,
18743}
18744impl LOG_REQUEST_END_DATA {
18745    pub const ENCODED_LEN: usize = 2usize;
18746    pub const DEFAULT: Self = Self {
18747        target_system: 0_u8,
18748        target_component: 0_u8,
18749    };
18750    #[cfg(feature = "arbitrary")]
18751    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18752        use arbitrary::{Arbitrary, Unstructured};
18753        let mut buf = [0u8; 1024];
18754        rng.fill_bytes(&mut buf);
18755        let mut unstructured = Unstructured::new(&buf);
18756        Self::arbitrary(&mut unstructured).unwrap_or_default()
18757    }
18758}
18759impl Default for LOG_REQUEST_END_DATA {
18760    fn default() -> Self {
18761        Self::DEFAULT.clone()
18762    }
18763}
18764impl MessageData for LOG_REQUEST_END_DATA {
18765    type Message = MavMessage;
18766    const ID: u32 = 122u32;
18767    const NAME: &'static str = "LOG_REQUEST_END";
18768    const EXTRA_CRC: u8 = 203u8;
18769    const ENCODED_LEN: usize = 2usize;
18770    fn deser(
18771        _version: MavlinkVersion,
18772        __input: &[u8],
18773    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18774        let avail_len = __input.len();
18775        let mut payload_buf = [0; Self::ENCODED_LEN];
18776        let mut buf = if avail_len < Self::ENCODED_LEN {
18777            payload_buf[0..avail_len].copy_from_slice(__input);
18778            Bytes::new(&payload_buf)
18779        } else {
18780            Bytes::new(__input)
18781        };
18782        let mut __struct = Self::default();
18783        __struct.target_system = buf.get_u8();
18784        __struct.target_component = buf.get_u8();
18785        Ok(__struct)
18786    }
18787    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18788        let mut __tmp = BytesMut::new(bytes);
18789        #[allow(clippy::absurd_extreme_comparisons)]
18790        #[allow(unused_comparisons)]
18791        if __tmp.remaining() < Self::ENCODED_LEN {
18792            panic!(
18793                "buffer is too small (need {} bytes, but got {})",
18794                Self::ENCODED_LEN,
18795                __tmp.remaining(),
18796            )
18797        }
18798        __tmp.put_u8(self.target_system);
18799        __tmp.put_u8(self.target_component);
18800        if matches!(version, MavlinkVersion::V2) {
18801            let len = __tmp.len();
18802            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18803        } else {
18804            __tmp.len()
18805        }
18806    }
18807}
18808#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18809#[doc = ""]
18810#[doc = "ID: 117"]
18811#[derive(Debug, Clone, PartialEq)]
18812#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18813#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18814pub struct LOG_REQUEST_LIST_DATA {
18815    #[doc = "First log id (0 for first available)"]
18816    pub start: u16,
18817    #[doc = "Last log id (0xffff for last available)"]
18818    pub end: u16,
18819    #[doc = "System ID"]
18820    pub target_system: u8,
18821    #[doc = "Component ID"]
18822    pub target_component: u8,
18823}
18824impl LOG_REQUEST_LIST_DATA {
18825    pub const ENCODED_LEN: usize = 6usize;
18826    pub const DEFAULT: Self = Self {
18827        start: 0_u16,
18828        end: 0_u16,
18829        target_system: 0_u8,
18830        target_component: 0_u8,
18831    };
18832    #[cfg(feature = "arbitrary")]
18833    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18834        use arbitrary::{Arbitrary, Unstructured};
18835        let mut buf = [0u8; 1024];
18836        rng.fill_bytes(&mut buf);
18837        let mut unstructured = Unstructured::new(&buf);
18838        Self::arbitrary(&mut unstructured).unwrap_or_default()
18839    }
18840}
18841impl Default for LOG_REQUEST_LIST_DATA {
18842    fn default() -> Self {
18843        Self::DEFAULT.clone()
18844    }
18845}
18846impl MessageData for LOG_REQUEST_LIST_DATA {
18847    type Message = MavMessage;
18848    const ID: u32 = 117u32;
18849    const NAME: &'static str = "LOG_REQUEST_LIST";
18850    const EXTRA_CRC: u8 = 128u8;
18851    const ENCODED_LEN: usize = 6usize;
18852    fn deser(
18853        _version: MavlinkVersion,
18854        __input: &[u8],
18855    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18856        let avail_len = __input.len();
18857        let mut payload_buf = [0; Self::ENCODED_LEN];
18858        let mut buf = if avail_len < Self::ENCODED_LEN {
18859            payload_buf[0..avail_len].copy_from_slice(__input);
18860            Bytes::new(&payload_buf)
18861        } else {
18862            Bytes::new(__input)
18863        };
18864        let mut __struct = Self::default();
18865        __struct.start = buf.get_u16_le();
18866        __struct.end = buf.get_u16_le();
18867        __struct.target_system = buf.get_u8();
18868        __struct.target_component = buf.get_u8();
18869        Ok(__struct)
18870    }
18871    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18872        let mut __tmp = BytesMut::new(bytes);
18873        #[allow(clippy::absurd_extreme_comparisons)]
18874        #[allow(unused_comparisons)]
18875        if __tmp.remaining() < Self::ENCODED_LEN {
18876            panic!(
18877                "buffer is too small (need {} bytes, but got {})",
18878                Self::ENCODED_LEN,
18879                __tmp.remaining(),
18880            )
18881        }
18882        __tmp.put_u16_le(self.start);
18883        __tmp.put_u16_le(self.end);
18884        __tmp.put_u8(self.target_system);
18885        __tmp.put_u8(self.target_component);
18886        if matches!(version, MavlinkVersion::V2) {
18887            let len = __tmp.len();
18888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18889        } else {
18890            __tmp.len()
18891        }
18892    }
18893}
18894#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18895#[doc = ""]
18896#[doc = "ID: 192"]
18897#[derive(Debug, Clone, PartialEq)]
18898#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18899#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18900pub struct MAG_CAL_REPORT_DATA {
18901    #[doc = "RMS milligauss residuals."]
18902    pub fitness: f32,
18903    #[doc = "X offset."]
18904    pub ofs_x: f32,
18905    #[doc = "Y offset."]
18906    pub ofs_y: f32,
18907    #[doc = "Z offset."]
18908    pub ofs_z: f32,
18909    #[doc = "X diagonal (matrix 11)."]
18910    pub diag_x: f32,
18911    #[doc = "Y diagonal (matrix 22)."]
18912    pub diag_y: f32,
18913    #[doc = "Z diagonal (matrix 33)."]
18914    pub diag_z: f32,
18915    #[doc = "X off-diagonal (matrix 12 and 21)."]
18916    pub offdiag_x: f32,
18917    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18918    pub offdiag_y: f32,
18919    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18920    pub offdiag_z: f32,
18921    #[doc = "Compass being calibrated."]
18922    pub compass_id: u8,
18923    #[doc = "Bitmask of compasses being calibrated."]
18924    pub cal_mask: u8,
18925    #[doc = "Calibration Status."]
18926    pub cal_status: MagCalStatus,
18927    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18928    pub autosaved: u8,
18929    #[doc = "Confidence in orientation (higher is better)."]
18930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18931    pub orientation_confidence: f32,
18932    #[doc = "orientation before calibration."]
18933    #[cfg_attr(feature = "serde", serde(default))]
18934    pub old_orientation: MavSensorOrientation,
18935    #[doc = "orientation after calibration."]
18936    #[cfg_attr(feature = "serde", serde(default))]
18937    pub new_orientation: MavSensorOrientation,
18938    #[doc = "field radius correction factor"]
18939    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18940    pub scale_factor: f32,
18941}
18942impl MAG_CAL_REPORT_DATA {
18943    pub const ENCODED_LEN: usize = 54usize;
18944    pub const DEFAULT: Self = Self {
18945        fitness: 0.0_f32,
18946        ofs_x: 0.0_f32,
18947        ofs_y: 0.0_f32,
18948        ofs_z: 0.0_f32,
18949        diag_x: 0.0_f32,
18950        diag_y: 0.0_f32,
18951        diag_z: 0.0_f32,
18952        offdiag_x: 0.0_f32,
18953        offdiag_y: 0.0_f32,
18954        offdiag_z: 0.0_f32,
18955        compass_id: 0_u8,
18956        cal_mask: 0_u8,
18957        cal_status: MagCalStatus::DEFAULT,
18958        autosaved: 0_u8,
18959        orientation_confidence: 0.0_f32,
18960        old_orientation: MavSensorOrientation::DEFAULT,
18961        new_orientation: MavSensorOrientation::DEFAULT,
18962        scale_factor: 0.0_f32,
18963    };
18964    #[cfg(feature = "arbitrary")]
18965    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18966        use arbitrary::{Arbitrary, Unstructured};
18967        let mut buf = [0u8; 1024];
18968        rng.fill_bytes(&mut buf);
18969        let mut unstructured = Unstructured::new(&buf);
18970        Self::arbitrary(&mut unstructured).unwrap_or_default()
18971    }
18972}
18973impl Default for MAG_CAL_REPORT_DATA {
18974    fn default() -> Self {
18975        Self::DEFAULT.clone()
18976    }
18977}
18978impl MessageData for MAG_CAL_REPORT_DATA {
18979    type Message = MavMessage;
18980    const ID: u32 = 192u32;
18981    const NAME: &'static str = "MAG_CAL_REPORT";
18982    const EXTRA_CRC: u8 = 36u8;
18983    const ENCODED_LEN: usize = 54usize;
18984    fn deser(
18985        _version: MavlinkVersion,
18986        __input: &[u8],
18987    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18988        let avail_len = __input.len();
18989        let mut payload_buf = [0; Self::ENCODED_LEN];
18990        let mut buf = if avail_len < Self::ENCODED_LEN {
18991            payload_buf[0..avail_len].copy_from_slice(__input);
18992            Bytes::new(&payload_buf)
18993        } else {
18994            Bytes::new(__input)
18995        };
18996        let mut __struct = Self::default();
18997        __struct.fitness = buf.get_f32_le();
18998        __struct.ofs_x = buf.get_f32_le();
18999        __struct.ofs_y = buf.get_f32_le();
19000        __struct.ofs_z = buf.get_f32_le();
19001        __struct.diag_x = buf.get_f32_le();
19002        __struct.diag_y = buf.get_f32_le();
19003        __struct.diag_z = buf.get_f32_le();
19004        __struct.offdiag_x = buf.get_f32_le();
19005        __struct.offdiag_y = buf.get_f32_le();
19006        __struct.offdiag_z = buf.get_f32_le();
19007        __struct.compass_id = buf.get_u8();
19008        __struct.cal_mask = buf.get_u8();
19009        let tmp = buf.get_u8();
19010        __struct.cal_status =
19011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19012                enum_type: "MagCalStatus",
19013                value: tmp as u32,
19014            })?;
19015        __struct.autosaved = buf.get_u8();
19016        __struct.orientation_confidence = buf.get_f32_le();
19017        let tmp = buf.get_u8();
19018        __struct.old_orientation =
19019            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19020                enum_type: "MavSensorOrientation",
19021                value: tmp as u32,
19022            })?;
19023        let tmp = buf.get_u8();
19024        __struct.new_orientation =
19025            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19026                enum_type: "MavSensorOrientation",
19027                value: tmp as u32,
19028            })?;
19029        __struct.scale_factor = buf.get_f32_le();
19030        Ok(__struct)
19031    }
19032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19033        let mut __tmp = BytesMut::new(bytes);
19034        #[allow(clippy::absurd_extreme_comparisons)]
19035        #[allow(unused_comparisons)]
19036        if __tmp.remaining() < Self::ENCODED_LEN {
19037            panic!(
19038                "buffer is too small (need {} bytes, but got {})",
19039                Self::ENCODED_LEN,
19040                __tmp.remaining(),
19041            )
19042        }
19043        __tmp.put_f32_le(self.fitness);
19044        __tmp.put_f32_le(self.ofs_x);
19045        __tmp.put_f32_le(self.ofs_y);
19046        __tmp.put_f32_le(self.ofs_z);
19047        __tmp.put_f32_le(self.diag_x);
19048        __tmp.put_f32_le(self.diag_y);
19049        __tmp.put_f32_le(self.diag_z);
19050        __tmp.put_f32_le(self.offdiag_x);
19051        __tmp.put_f32_le(self.offdiag_y);
19052        __tmp.put_f32_le(self.offdiag_z);
19053        __tmp.put_u8(self.compass_id);
19054        __tmp.put_u8(self.cal_mask);
19055        __tmp.put_u8(self.cal_status as u8);
19056        __tmp.put_u8(self.autosaved);
19057        __tmp.put_f32_le(self.orientation_confidence);
19058        __tmp.put_u8(self.old_orientation as u8);
19059        __tmp.put_u8(self.new_orientation as u8);
19060        __tmp.put_f32_le(self.scale_factor);
19061        if matches!(version, MavlinkVersion::V2) {
19062            let len = __tmp.len();
19063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19064        } else {
19065            __tmp.len()
19066        }
19067    }
19068}
19069#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
19070#[doc = ""]
19071#[doc = "ID: 69"]
19072#[derive(Debug, Clone, PartialEq)]
19073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19075pub struct MANUAL_CONTROL_DATA {
19076    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
19077    pub x: i16,
19078    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
19079    pub y: i16,
19080    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
19081    pub z: i16,
19082    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
19083    pub r: i16,
19084    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
19085    pub buttons: u16,
19086    #[doc = "The system to be controlled."]
19087    pub target: u8,
19088    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
19089    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19090    pub buttons2: u16,
19091    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
19092    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19093    pub enabled_extensions: u8,
19094    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
19095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19096    pub s: i16,
19097    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
19098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19099    pub t: i16,
19100    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
19101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19102    pub aux1: i16,
19103    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
19104    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19105    pub aux2: i16,
19106    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
19107    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19108    pub aux3: i16,
19109    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
19110    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19111    pub aux4: i16,
19112    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
19113    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19114    pub aux5: i16,
19115    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
19116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19117    pub aux6: i16,
19118}
19119impl MANUAL_CONTROL_DATA {
19120    pub const ENCODED_LEN: usize = 30usize;
19121    pub const DEFAULT: Self = Self {
19122        x: 0_i16,
19123        y: 0_i16,
19124        z: 0_i16,
19125        r: 0_i16,
19126        buttons: 0_u16,
19127        target: 0_u8,
19128        buttons2: 0_u16,
19129        enabled_extensions: 0_u8,
19130        s: 0_i16,
19131        t: 0_i16,
19132        aux1: 0_i16,
19133        aux2: 0_i16,
19134        aux3: 0_i16,
19135        aux4: 0_i16,
19136        aux5: 0_i16,
19137        aux6: 0_i16,
19138    };
19139    #[cfg(feature = "arbitrary")]
19140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19141        use arbitrary::{Arbitrary, Unstructured};
19142        let mut buf = [0u8; 1024];
19143        rng.fill_bytes(&mut buf);
19144        let mut unstructured = Unstructured::new(&buf);
19145        Self::arbitrary(&mut unstructured).unwrap_or_default()
19146    }
19147}
19148impl Default for MANUAL_CONTROL_DATA {
19149    fn default() -> Self {
19150        Self::DEFAULT.clone()
19151    }
19152}
19153impl MessageData for MANUAL_CONTROL_DATA {
19154    type Message = MavMessage;
19155    const ID: u32 = 69u32;
19156    const NAME: &'static str = "MANUAL_CONTROL";
19157    const EXTRA_CRC: u8 = 243u8;
19158    const ENCODED_LEN: usize = 30usize;
19159    fn deser(
19160        _version: MavlinkVersion,
19161        __input: &[u8],
19162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19163        let avail_len = __input.len();
19164        let mut payload_buf = [0; Self::ENCODED_LEN];
19165        let mut buf = if avail_len < Self::ENCODED_LEN {
19166            payload_buf[0..avail_len].copy_from_slice(__input);
19167            Bytes::new(&payload_buf)
19168        } else {
19169            Bytes::new(__input)
19170        };
19171        let mut __struct = Self::default();
19172        __struct.x = buf.get_i16_le();
19173        __struct.y = buf.get_i16_le();
19174        __struct.z = buf.get_i16_le();
19175        __struct.r = buf.get_i16_le();
19176        __struct.buttons = buf.get_u16_le();
19177        __struct.target = buf.get_u8();
19178        __struct.buttons2 = buf.get_u16_le();
19179        __struct.enabled_extensions = buf.get_u8();
19180        __struct.s = buf.get_i16_le();
19181        __struct.t = buf.get_i16_le();
19182        __struct.aux1 = buf.get_i16_le();
19183        __struct.aux2 = buf.get_i16_le();
19184        __struct.aux3 = buf.get_i16_le();
19185        __struct.aux4 = buf.get_i16_le();
19186        __struct.aux5 = buf.get_i16_le();
19187        __struct.aux6 = buf.get_i16_le();
19188        Ok(__struct)
19189    }
19190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19191        let mut __tmp = BytesMut::new(bytes);
19192        #[allow(clippy::absurd_extreme_comparisons)]
19193        #[allow(unused_comparisons)]
19194        if __tmp.remaining() < Self::ENCODED_LEN {
19195            panic!(
19196                "buffer is too small (need {} bytes, but got {})",
19197                Self::ENCODED_LEN,
19198                __tmp.remaining(),
19199            )
19200        }
19201        __tmp.put_i16_le(self.x);
19202        __tmp.put_i16_le(self.y);
19203        __tmp.put_i16_le(self.z);
19204        __tmp.put_i16_le(self.r);
19205        __tmp.put_u16_le(self.buttons);
19206        __tmp.put_u8(self.target);
19207        __tmp.put_u16_le(self.buttons2);
19208        __tmp.put_u8(self.enabled_extensions);
19209        __tmp.put_i16_le(self.s);
19210        __tmp.put_i16_le(self.t);
19211        __tmp.put_i16_le(self.aux1);
19212        __tmp.put_i16_le(self.aux2);
19213        __tmp.put_i16_le(self.aux3);
19214        __tmp.put_i16_le(self.aux4);
19215        __tmp.put_i16_le(self.aux5);
19216        __tmp.put_i16_le(self.aux6);
19217        if matches!(version, MavlinkVersion::V2) {
19218            let len = __tmp.len();
19219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19220        } else {
19221            __tmp.len()
19222        }
19223    }
19224}
19225#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
19226#[doc = ""]
19227#[doc = "ID: 81"]
19228#[derive(Debug, Clone, PartialEq)]
19229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19231pub struct MANUAL_SETPOINT_DATA {
19232    #[doc = "Timestamp (time since system boot)."]
19233    pub time_boot_ms: u32,
19234    #[doc = "Desired roll rate"]
19235    pub roll: f32,
19236    #[doc = "Desired pitch rate"]
19237    pub pitch: f32,
19238    #[doc = "Desired yaw rate"]
19239    pub yaw: f32,
19240    #[doc = "Collective thrust, normalized to 0 .. 1"]
19241    pub thrust: f32,
19242    #[doc = "Flight mode switch position, 0.. 255"]
19243    pub mode_switch: u8,
19244    #[doc = "Override mode switch position, 0.. 255"]
19245    pub manual_override_switch: u8,
19246}
19247impl MANUAL_SETPOINT_DATA {
19248    pub const ENCODED_LEN: usize = 22usize;
19249    pub const DEFAULT: Self = Self {
19250        time_boot_ms: 0_u32,
19251        roll: 0.0_f32,
19252        pitch: 0.0_f32,
19253        yaw: 0.0_f32,
19254        thrust: 0.0_f32,
19255        mode_switch: 0_u8,
19256        manual_override_switch: 0_u8,
19257    };
19258    #[cfg(feature = "arbitrary")]
19259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19260        use arbitrary::{Arbitrary, Unstructured};
19261        let mut buf = [0u8; 1024];
19262        rng.fill_bytes(&mut buf);
19263        let mut unstructured = Unstructured::new(&buf);
19264        Self::arbitrary(&mut unstructured).unwrap_or_default()
19265    }
19266}
19267impl Default for MANUAL_SETPOINT_DATA {
19268    fn default() -> Self {
19269        Self::DEFAULT.clone()
19270    }
19271}
19272impl MessageData for MANUAL_SETPOINT_DATA {
19273    type Message = MavMessage;
19274    const ID: u32 = 81u32;
19275    const NAME: &'static str = "MANUAL_SETPOINT";
19276    const EXTRA_CRC: u8 = 106u8;
19277    const ENCODED_LEN: usize = 22usize;
19278    fn deser(
19279        _version: MavlinkVersion,
19280        __input: &[u8],
19281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19282        let avail_len = __input.len();
19283        let mut payload_buf = [0; Self::ENCODED_LEN];
19284        let mut buf = if avail_len < Self::ENCODED_LEN {
19285            payload_buf[0..avail_len].copy_from_slice(__input);
19286            Bytes::new(&payload_buf)
19287        } else {
19288            Bytes::new(__input)
19289        };
19290        let mut __struct = Self::default();
19291        __struct.time_boot_ms = buf.get_u32_le();
19292        __struct.roll = buf.get_f32_le();
19293        __struct.pitch = buf.get_f32_le();
19294        __struct.yaw = buf.get_f32_le();
19295        __struct.thrust = buf.get_f32_le();
19296        __struct.mode_switch = buf.get_u8();
19297        __struct.manual_override_switch = buf.get_u8();
19298        Ok(__struct)
19299    }
19300    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19301        let mut __tmp = BytesMut::new(bytes);
19302        #[allow(clippy::absurd_extreme_comparisons)]
19303        #[allow(unused_comparisons)]
19304        if __tmp.remaining() < Self::ENCODED_LEN {
19305            panic!(
19306                "buffer is too small (need {} bytes, but got {})",
19307                Self::ENCODED_LEN,
19308                __tmp.remaining(),
19309            )
19310        }
19311        __tmp.put_u32_le(self.time_boot_ms);
19312        __tmp.put_f32_le(self.roll);
19313        __tmp.put_f32_le(self.pitch);
19314        __tmp.put_f32_le(self.yaw);
19315        __tmp.put_f32_le(self.thrust);
19316        __tmp.put_u8(self.mode_switch);
19317        __tmp.put_u8(self.manual_override_switch);
19318        if matches!(version, MavlinkVersion::V2) {
19319            let len = __tmp.len();
19320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19321        } else {
19322            __tmp.len()
19323        }
19324    }
19325}
19326#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19327#[doc = ""]
19328#[doc = "ID: 249"]
19329#[derive(Debug, Clone, PartialEq)]
19330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19332pub struct MEMORY_VECT_DATA {
19333    #[doc = "Starting address of the debug variables"]
19334    pub address: u16,
19335    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
19336    pub ver: u8,
19337    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
19338    pub mavtype: u8,
19339    #[doc = "Memory contents at specified address"]
19340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19341    pub value: [i8; 32],
19342}
19343impl MEMORY_VECT_DATA {
19344    pub const ENCODED_LEN: usize = 36usize;
19345    pub const DEFAULT: Self = Self {
19346        address: 0_u16,
19347        ver: 0_u8,
19348        mavtype: 0_u8,
19349        value: [0_i8; 32usize],
19350    };
19351    #[cfg(feature = "arbitrary")]
19352    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19353        use arbitrary::{Arbitrary, Unstructured};
19354        let mut buf = [0u8; 1024];
19355        rng.fill_bytes(&mut buf);
19356        let mut unstructured = Unstructured::new(&buf);
19357        Self::arbitrary(&mut unstructured).unwrap_or_default()
19358    }
19359}
19360impl Default for MEMORY_VECT_DATA {
19361    fn default() -> Self {
19362        Self::DEFAULT.clone()
19363    }
19364}
19365impl MessageData for MEMORY_VECT_DATA {
19366    type Message = MavMessage;
19367    const ID: u32 = 249u32;
19368    const NAME: &'static str = "MEMORY_VECT";
19369    const EXTRA_CRC: u8 = 204u8;
19370    const ENCODED_LEN: usize = 36usize;
19371    fn deser(
19372        _version: MavlinkVersion,
19373        __input: &[u8],
19374    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19375        let avail_len = __input.len();
19376        let mut payload_buf = [0; Self::ENCODED_LEN];
19377        let mut buf = if avail_len < Self::ENCODED_LEN {
19378            payload_buf[0..avail_len].copy_from_slice(__input);
19379            Bytes::new(&payload_buf)
19380        } else {
19381            Bytes::new(__input)
19382        };
19383        let mut __struct = Self::default();
19384        __struct.address = buf.get_u16_le();
19385        __struct.ver = buf.get_u8();
19386        __struct.mavtype = buf.get_u8();
19387        for v in &mut __struct.value {
19388            let val = buf.get_i8();
19389            *v = val;
19390        }
19391        Ok(__struct)
19392    }
19393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19394        let mut __tmp = BytesMut::new(bytes);
19395        #[allow(clippy::absurd_extreme_comparisons)]
19396        #[allow(unused_comparisons)]
19397        if __tmp.remaining() < Self::ENCODED_LEN {
19398            panic!(
19399                "buffer is too small (need {} bytes, but got {})",
19400                Self::ENCODED_LEN,
19401                __tmp.remaining(),
19402            )
19403        }
19404        __tmp.put_u16_le(self.address);
19405        __tmp.put_u8(self.ver);
19406        __tmp.put_u8(self.mavtype);
19407        for val in &self.value {
19408            __tmp.put_i8(*val);
19409        }
19410        if matches!(version, MavlinkVersion::V2) {
19411            let len = __tmp.len();
19412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19413        } else {
19414            __tmp.len()
19415        }
19416    }
19417}
19418#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
19419#[doc = ""]
19420#[doc = "ID: 244"]
19421#[derive(Debug, Clone, PartialEq)]
19422#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19423#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19424pub struct MESSAGE_INTERVAL_DATA {
19425    #[doc = "0 indicates the interval at which it is sent."]
19426    pub interval_us: i32,
19427    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
19428    pub message_id: u16,
19429}
19430impl MESSAGE_INTERVAL_DATA {
19431    pub const ENCODED_LEN: usize = 6usize;
19432    pub const DEFAULT: Self = Self {
19433        interval_us: 0_i32,
19434        message_id: 0_u16,
19435    };
19436    #[cfg(feature = "arbitrary")]
19437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19438        use arbitrary::{Arbitrary, Unstructured};
19439        let mut buf = [0u8; 1024];
19440        rng.fill_bytes(&mut buf);
19441        let mut unstructured = Unstructured::new(&buf);
19442        Self::arbitrary(&mut unstructured).unwrap_or_default()
19443    }
19444}
19445impl Default for MESSAGE_INTERVAL_DATA {
19446    fn default() -> Self {
19447        Self::DEFAULT.clone()
19448    }
19449}
19450impl MessageData for MESSAGE_INTERVAL_DATA {
19451    type Message = MavMessage;
19452    const ID: u32 = 244u32;
19453    const NAME: &'static str = "MESSAGE_INTERVAL";
19454    const EXTRA_CRC: u8 = 95u8;
19455    const ENCODED_LEN: usize = 6usize;
19456    fn deser(
19457        _version: MavlinkVersion,
19458        __input: &[u8],
19459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19460        let avail_len = __input.len();
19461        let mut payload_buf = [0; Self::ENCODED_LEN];
19462        let mut buf = if avail_len < Self::ENCODED_LEN {
19463            payload_buf[0..avail_len].copy_from_slice(__input);
19464            Bytes::new(&payload_buf)
19465        } else {
19466            Bytes::new(__input)
19467        };
19468        let mut __struct = Self::default();
19469        __struct.interval_us = buf.get_i32_le();
19470        __struct.message_id = buf.get_u16_le();
19471        Ok(__struct)
19472    }
19473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19474        let mut __tmp = BytesMut::new(bytes);
19475        #[allow(clippy::absurd_extreme_comparisons)]
19476        #[allow(unused_comparisons)]
19477        if __tmp.remaining() < Self::ENCODED_LEN {
19478            panic!(
19479                "buffer is too small (need {} bytes, but got {})",
19480                Self::ENCODED_LEN,
19481                __tmp.remaining(),
19482            )
19483        }
19484        __tmp.put_i32_le(self.interval_us);
19485        __tmp.put_u16_le(self.message_id);
19486        if matches!(version, MavlinkVersion::V2) {
19487            let len = __tmp.len();
19488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19489        } else {
19490            __tmp.len()
19491        }
19492    }
19493}
19494#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
19495#[doc = ""]
19496#[doc = "ID: 47"]
19497#[derive(Debug, Clone, PartialEq)]
19498#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19499#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19500pub struct MISSION_ACK_DATA {
19501    #[doc = "System ID"]
19502    pub target_system: u8,
19503    #[doc = "Component ID"]
19504    pub target_component: u8,
19505    #[doc = "Mission result."]
19506    pub mavtype: MavMissionResult,
19507    #[doc = "Mission type."]
19508    #[cfg_attr(feature = "serde", serde(default))]
19509    pub mission_type: MavMissionType,
19510    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
19511    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19512    pub opaque_id: u32,
19513}
19514impl MISSION_ACK_DATA {
19515    pub const ENCODED_LEN: usize = 8usize;
19516    pub const DEFAULT: Self = Self {
19517        target_system: 0_u8,
19518        target_component: 0_u8,
19519        mavtype: MavMissionResult::DEFAULT,
19520        mission_type: MavMissionType::DEFAULT,
19521        opaque_id: 0_u32,
19522    };
19523    #[cfg(feature = "arbitrary")]
19524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19525        use arbitrary::{Arbitrary, Unstructured};
19526        let mut buf = [0u8; 1024];
19527        rng.fill_bytes(&mut buf);
19528        let mut unstructured = Unstructured::new(&buf);
19529        Self::arbitrary(&mut unstructured).unwrap_or_default()
19530    }
19531}
19532impl Default for MISSION_ACK_DATA {
19533    fn default() -> Self {
19534        Self::DEFAULT.clone()
19535    }
19536}
19537impl MessageData for MISSION_ACK_DATA {
19538    type Message = MavMessage;
19539    const ID: u32 = 47u32;
19540    const NAME: &'static str = "MISSION_ACK";
19541    const EXTRA_CRC: u8 = 153u8;
19542    const ENCODED_LEN: usize = 8usize;
19543    fn deser(
19544        _version: MavlinkVersion,
19545        __input: &[u8],
19546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19547        let avail_len = __input.len();
19548        let mut payload_buf = [0; Self::ENCODED_LEN];
19549        let mut buf = if avail_len < Self::ENCODED_LEN {
19550            payload_buf[0..avail_len].copy_from_slice(__input);
19551            Bytes::new(&payload_buf)
19552        } else {
19553            Bytes::new(__input)
19554        };
19555        let mut __struct = Self::default();
19556        __struct.target_system = buf.get_u8();
19557        __struct.target_component = buf.get_u8();
19558        let tmp = buf.get_u8();
19559        __struct.mavtype =
19560            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19561                enum_type: "MavMissionResult",
19562                value: tmp as u32,
19563            })?;
19564        let tmp = buf.get_u8();
19565        __struct.mission_type =
19566            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19567                enum_type: "MavMissionType",
19568                value: tmp as u32,
19569            })?;
19570        __struct.opaque_id = buf.get_u32_le();
19571        Ok(__struct)
19572    }
19573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19574        let mut __tmp = BytesMut::new(bytes);
19575        #[allow(clippy::absurd_extreme_comparisons)]
19576        #[allow(unused_comparisons)]
19577        if __tmp.remaining() < Self::ENCODED_LEN {
19578            panic!(
19579                "buffer is too small (need {} bytes, but got {})",
19580                Self::ENCODED_LEN,
19581                __tmp.remaining(),
19582            )
19583        }
19584        __tmp.put_u8(self.target_system);
19585        __tmp.put_u8(self.target_component);
19586        __tmp.put_u8(self.mavtype as u8);
19587        __tmp.put_u8(self.mission_type as u8);
19588        __tmp.put_u32_le(self.opaque_id);
19589        if matches!(version, MavlinkVersion::V2) {
19590            let len = __tmp.len();
19591            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19592        } else {
19593            __tmp.len()
19594        }
19595    }
19596}
19597#[doc = "Delete all mission items at once."]
19598#[doc = ""]
19599#[doc = "ID: 45"]
19600#[derive(Debug, Clone, PartialEq)]
19601#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19602#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19603pub struct MISSION_CLEAR_ALL_DATA {
19604    #[doc = "System ID"]
19605    pub target_system: u8,
19606    #[doc = "Component ID"]
19607    pub target_component: u8,
19608    #[doc = "Mission type."]
19609    #[cfg_attr(feature = "serde", serde(default))]
19610    pub mission_type: MavMissionType,
19611}
19612impl MISSION_CLEAR_ALL_DATA {
19613    pub const ENCODED_LEN: usize = 3usize;
19614    pub const DEFAULT: Self = Self {
19615        target_system: 0_u8,
19616        target_component: 0_u8,
19617        mission_type: MavMissionType::DEFAULT,
19618    };
19619    #[cfg(feature = "arbitrary")]
19620    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19621        use arbitrary::{Arbitrary, Unstructured};
19622        let mut buf = [0u8; 1024];
19623        rng.fill_bytes(&mut buf);
19624        let mut unstructured = Unstructured::new(&buf);
19625        Self::arbitrary(&mut unstructured).unwrap_or_default()
19626    }
19627}
19628impl Default for MISSION_CLEAR_ALL_DATA {
19629    fn default() -> Self {
19630        Self::DEFAULT.clone()
19631    }
19632}
19633impl MessageData for MISSION_CLEAR_ALL_DATA {
19634    type Message = MavMessage;
19635    const ID: u32 = 45u32;
19636    const NAME: &'static str = "MISSION_CLEAR_ALL";
19637    const EXTRA_CRC: u8 = 232u8;
19638    const ENCODED_LEN: usize = 3usize;
19639    fn deser(
19640        _version: MavlinkVersion,
19641        __input: &[u8],
19642    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19643        let avail_len = __input.len();
19644        let mut payload_buf = [0; Self::ENCODED_LEN];
19645        let mut buf = if avail_len < Self::ENCODED_LEN {
19646            payload_buf[0..avail_len].copy_from_slice(__input);
19647            Bytes::new(&payload_buf)
19648        } else {
19649            Bytes::new(__input)
19650        };
19651        let mut __struct = Self::default();
19652        __struct.target_system = buf.get_u8();
19653        __struct.target_component = buf.get_u8();
19654        let tmp = buf.get_u8();
19655        __struct.mission_type =
19656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19657                enum_type: "MavMissionType",
19658                value: tmp as u32,
19659            })?;
19660        Ok(__struct)
19661    }
19662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19663        let mut __tmp = BytesMut::new(bytes);
19664        #[allow(clippy::absurd_extreme_comparisons)]
19665        #[allow(unused_comparisons)]
19666        if __tmp.remaining() < Self::ENCODED_LEN {
19667            panic!(
19668                "buffer is too small (need {} bytes, but got {})",
19669                Self::ENCODED_LEN,
19670                __tmp.remaining(),
19671            )
19672        }
19673        __tmp.put_u8(self.target_system);
19674        __tmp.put_u8(self.target_component);
19675        __tmp.put_u8(self.mission_type as u8);
19676        if matches!(version, MavlinkVersion::V2) {
19677            let len = __tmp.len();
19678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19679        } else {
19680            __tmp.len()
19681        }
19682    }
19683}
19684#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19685#[doc = ""]
19686#[doc = "ID: 44"]
19687#[derive(Debug, Clone, PartialEq)]
19688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19690pub struct MISSION_COUNT_DATA {
19691    #[doc = "Number of mission items in the sequence"]
19692    pub count: u16,
19693    #[doc = "System ID"]
19694    pub target_system: u8,
19695    #[doc = "Component ID"]
19696    pub target_component: u8,
19697    #[doc = "Mission type."]
19698    #[cfg_attr(feature = "serde", serde(default))]
19699    pub mission_type: MavMissionType,
19700    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19702    pub opaque_id: u32,
19703}
19704impl MISSION_COUNT_DATA {
19705    pub const ENCODED_LEN: usize = 9usize;
19706    pub const DEFAULT: Self = Self {
19707        count: 0_u16,
19708        target_system: 0_u8,
19709        target_component: 0_u8,
19710        mission_type: MavMissionType::DEFAULT,
19711        opaque_id: 0_u32,
19712    };
19713    #[cfg(feature = "arbitrary")]
19714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19715        use arbitrary::{Arbitrary, Unstructured};
19716        let mut buf = [0u8; 1024];
19717        rng.fill_bytes(&mut buf);
19718        let mut unstructured = Unstructured::new(&buf);
19719        Self::arbitrary(&mut unstructured).unwrap_or_default()
19720    }
19721}
19722impl Default for MISSION_COUNT_DATA {
19723    fn default() -> Self {
19724        Self::DEFAULT.clone()
19725    }
19726}
19727impl MessageData for MISSION_COUNT_DATA {
19728    type Message = MavMessage;
19729    const ID: u32 = 44u32;
19730    const NAME: &'static str = "MISSION_COUNT";
19731    const EXTRA_CRC: u8 = 221u8;
19732    const ENCODED_LEN: usize = 9usize;
19733    fn deser(
19734        _version: MavlinkVersion,
19735        __input: &[u8],
19736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19737        let avail_len = __input.len();
19738        let mut payload_buf = [0; Self::ENCODED_LEN];
19739        let mut buf = if avail_len < Self::ENCODED_LEN {
19740            payload_buf[0..avail_len].copy_from_slice(__input);
19741            Bytes::new(&payload_buf)
19742        } else {
19743            Bytes::new(__input)
19744        };
19745        let mut __struct = Self::default();
19746        __struct.count = buf.get_u16_le();
19747        __struct.target_system = buf.get_u8();
19748        __struct.target_component = buf.get_u8();
19749        let tmp = buf.get_u8();
19750        __struct.mission_type =
19751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19752                enum_type: "MavMissionType",
19753                value: tmp as u32,
19754            })?;
19755        __struct.opaque_id = buf.get_u32_le();
19756        Ok(__struct)
19757    }
19758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19759        let mut __tmp = BytesMut::new(bytes);
19760        #[allow(clippy::absurd_extreme_comparisons)]
19761        #[allow(unused_comparisons)]
19762        if __tmp.remaining() < Self::ENCODED_LEN {
19763            panic!(
19764                "buffer is too small (need {} bytes, but got {})",
19765                Self::ENCODED_LEN,
19766                __tmp.remaining(),
19767            )
19768        }
19769        __tmp.put_u16_le(self.count);
19770        __tmp.put_u8(self.target_system);
19771        __tmp.put_u8(self.target_component);
19772        __tmp.put_u8(self.mission_type as u8);
19773        __tmp.put_u32_le(self.opaque_id);
19774        if matches!(version, MavlinkVersion::V2) {
19775            let len = __tmp.len();
19776            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19777        } else {
19778            __tmp.len()
19779        }
19780    }
19781}
19782#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19783#[doc = ""]
19784#[doc = "ID: 42"]
19785#[derive(Debug, Clone, PartialEq)]
19786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19788pub struct MISSION_CURRENT_DATA {
19789    #[doc = "Sequence"]
19790    pub seq: u16,
19791    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19793    pub total: u16,
19794    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19795    #[cfg_attr(feature = "serde", serde(default))]
19796    pub mission_state: MissionState,
19797    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19799    pub mission_mode: u8,
19800    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19801    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19802    pub mission_id: u32,
19803    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19804    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19805    pub fence_id: u32,
19806    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19807    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19808    pub rally_points_id: u32,
19809}
19810impl MISSION_CURRENT_DATA {
19811    pub const ENCODED_LEN: usize = 18usize;
19812    pub const DEFAULT: Self = Self {
19813        seq: 0_u16,
19814        total: 0_u16,
19815        mission_state: MissionState::DEFAULT,
19816        mission_mode: 0_u8,
19817        mission_id: 0_u32,
19818        fence_id: 0_u32,
19819        rally_points_id: 0_u32,
19820    };
19821    #[cfg(feature = "arbitrary")]
19822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19823        use arbitrary::{Arbitrary, Unstructured};
19824        let mut buf = [0u8; 1024];
19825        rng.fill_bytes(&mut buf);
19826        let mut unstructured = Unstructured::new(&buf);
19827        Self::arbitrary(&mut unstructured).unwrap_or_default()
19828    }
19829}
19830impl Default for MISSION_CURRENT_DATA {
19831    fn default() -> Self {
19832        Self::DEFAULT.clone()
19833    }
19834}
19835impl MessageData for MISSION_CURRENT_DATA {
19836    type Message = MavMessage;
19837    const ID: u32 = 42u32;
19838    const NAME: &'static str = "MISSION_CURRENT";
19839    const EXTRA_CRC: u8 = 28u8;
19840    const ENCODED_LEN: usize = 18usize;
19841    fn deser(
19842        _version: MavlinkVersion,
19843        __input: &[u8],
19844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19845        let avail_len = __input.len();
19846        let mut payload_buf = [0; Self::ENCODED_LEN];
19847        let mut buf = if avail_len < Self::ENCODED_LEN {
19848            payload_buf[0..avail_len].copy_from_slice(__input);
19849            Bytes::new(&payload_buf)
19850        } else {
19851            Bytes::new(__input)
19852        };
19853        let mut __struct = Self::default();
19854        __struct.seq = buf.get_u16_le();
19855        __struct.total = buf.get_u16_le();
19856        let tmp = buf.get_u8();
19857        __struct.mission_state =
19858            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19859                enum_type: "MissionState",
19860                value: tmp as u32,
19861            })?;
19862        __struct.mission_mode = buf.get_u8();
19863        __struct.mission_id = buf.get_u32_le();
19864        __struct.fence_id = buf.get_u32_le();
19865        __struct.rally_points_id = buf.get_u32_le();
19866        Ok(__struct)
19867    }
19868    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19869        let mut __tmp = BytesMut::new(bytes);
19870        #[allow(clippy::absurd_extreme_comparisons)]
19871        #[allow(unused_comparisons)]
19872        if __tmp.remaining() < Self::ENCODED_LEN {
19873            panic!(
19874                "buffer is too small (need {} bytes, but got {})",
19875                Self::ENCODED_LEN,
19876                __tmp.remaining(),
19877            )
19878        }
19879        __tmp.put_u16_le(self.seq);
19880        __tmp.put_u16_le(self.total);
19881        __tmp.put_u8(self.mission_state as u8);
19882        __tmp.put_u8(self.mission_mode);
19883        __tmp.put_u32_le(self.mission_id);
19884        __tmp.put_u32_le(self.fence_id);
19885        __tmp.put_u32_le(self.rally_points_id);
19886        if matches!(version, MavlinkVersion::V2) {
19887            let len = __tmp.len();
19888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19889        } else {
19890            __tmp.len()
19891        }
19892    }
19893}
19894#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19895#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19896#[doc = ""]
19897#[doc = "ID: 39"]
19898#[derive(Debug, Clone, PartialEq)]
19899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19901pub struct MISSION_ITEM_DATA {
19902    #[doc = "PARAM1, see MAV_CMD enum"]
19903    pub param1: f32,
19904    #[doc = "PARAM2, see MAV_CMD enum"]
19905    pub param2: f32,
19906    #[doc = "PARAM3, see MAV_CMD enum"]
19907    pub param3: f32,
19908    #[doc = "PARAM4, see MAV_CMD enum"]
19909    pub param4: f32,
19910    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19911    pub x: f32,
19912    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19913    pub y: f32,
19914    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19915    pub z: f32,
19916    #[doc = "Sequence"]
19917    pub seq: u16,
19918    #[doc = "The scheduled action for the waypoint."]
19919    pub command: MavCmd,
19920    #[doc = "System ID"]
19921    pub target_system: u8,
19922    #[doc = "Component ID"]
19923    pub target_component: u8,
19924    #[doc = "The coordinate system of the waypoint."]
19925    pub frame: MavFrame,
19926    #[doc = "false:0, true:1"]
19927    pub current: u8,
19928    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19929    pub autocontinue: u8,
19930    #[doc = "Mission type."]
19931    #[cfg_attr(feature = "serde", serde(default))]
19932    pub mission_type: MavMissionType,
19933}
19934impl MISSION_ITEM_DATA {
19935    pub const ENCODED_LEN: usize = 38usize;
19936    pub const DEFAULT: Self = Self {
19937        param1: 0.0_f32,
19938        param2: 0.0_f32,
19939        param3: 0.0_f32,
19940        param4: 0.0_f32,
19941        x: 0.0_f32,
19942        y: 0.0_f32,
19943        z: 0.0_f32,
19944        seq: 0_u16,
19945        command: MavCmd::DEFAULT,
19946        target_system: 0_u8,
19947        target_component: 0_u8,
19948        frame: MavFrame::DEFAULT,
19949        current: 0_u8,
19950        autocontinue: 0_u8,
19951        mission_type: MavMissionType::DEFAULT,
19952    };
19953    #[cfg(feature = "arbitrary")]
19954    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19955        use arbitrary::{Arbitrary, Unstructured};
19956        let mut buf = [0u8; 1024];
19957        rng.fill_bytes(&mut buf);
19958        let mut unstructured = Unstructured::new(&buf);
19959        Self::arbitrary(&mut unstructured).unwrap_or_default()
19960    }
19961}
19962impl Default for MISSION_ITEM_DATA {
19963    fn default() -> Self {
19964        Self::DEFAULT.clone()
19965    }
19966}
19967impl MessageData for MISSION_ITEM_DATA {
19968    type Message = MavMessage;
19969    const ID: u32 = 39u32;
19970    const NAME: &'static str = "MISSION_ITEM";
19971    const EXTRA_CRC: u8 = 254u8;
19972    const ENCODED_LEN: usize = 38usize;
19973    fn deser(
19974        _version: MavlinkVersion,
19975        __input: &[u8],
19976    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19977        let avail_len = __input.len();
19978        let mut payload_buf = [0; Self::ENCODED_LEN];
19979        let mut buf = if avail_len < Self::ENCODED_LEN {
19980            payload_buf[0..avail_len].copy_from_slice(__input);
19981            Bytes::new(&payload_buf)
19982        } else {
19983            Bytes::new(__input)
19984        };
19985        let mut __struct = Self::default();
19986        __struct.param1 = buf.get_f32_le();
19987        __struct.param2 = buf.get_f32_le();
19988        __struct.param3 = buf.get_f32_le();
19989        __struct.param4 = buf.get_f32_le();
19990        __struct.x = buf.get_f32_le();
19991        __struct.y = buf.get_f32_le();
19992        __struct.z = buf.get_f32_le();
19993        __struct.seq = buf.get_u16_le();
19994        let tmp = buf.get_u16_le();
19995        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19996            ::mavlink_core::error::ParserError::InvalidEnum {
19997                enum_type: "MavCmd",
19998                value: tmp as u32,
19999            },
20000        )?;
20001        __struct.target_system = buf.get_u8();
20002        __struct.target_component = buf.get_u8();
20003        let tmp = buf.get_u8();
20004        __struct.frame =
20005            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20006                enum_type: "MavFrame",
20007                value: tmp as u32,
20008            })?;
20009        __struct.current = buf.get_u8();
20010        __struct.autocontinue = buf.get_u8();
20011        let tmp = buf.get_u8();
20012        __struct.mission_type =
20013            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20014                enum_type: "MavMissionType",
20015                value: tmp as u32,
20016            })?;
20017        Ok(__struct)
20018    }
20019    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20020        let mut __tmp = BytesMut::new(bytes);
20021        #[allow(clippy::absurd_extreme_comparisons)]
20022        #[allow(unused_comparisons)]
20023        if __tmp.remaining() < Self::ENCODED_LEN {
20024            panic!(
20025                "buffer is too small (need {} bytes, but got {})",
20026                Self::ENCODED_LEN,
20027                __tmp.remaining(),
20028            )
20029        }
20030        __tmp.put_f32_le(self.param1);
20031        __tmp.put_f32_le(self.param2);
20032        __tmp.put_f32_le(self.param3);
20033        __tmp.put_f32_le(self.param4);
20034        __tmp.put_f32_le(self.x);
20035        __tmp.put_f32_le(self.y);
20036        __tmp.put_f32_le(self.z);
20037        __tmp.put_u16_le(self.seq);
20038        __tmp.put_u16_le(self.command as u16);
20039        __tmp.put_u8(self.target_system);
20040        __tmp.put_u8(self.target_component);
20041        __tmp.put_u8(self.frame as u8);
20042        __tmp.put_u8(self.current);
20043        __tmp.put_u8(self.autocontinue);
20044        __tmp.put_u8(self.mission_type as u8);
20045        if matches!(version, MavlinkVersion::V2) {
20046            let len = __tmp.len();
20047            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20048        } else {
20049            __tmp.len()
20050        }
20051    }
20052}
20053#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
20054#[doc = ""]
20055#[doc = "ID: 73"]
20056#[derive(Debug, Clone, PartialEq)]
20057#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20058#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20059pub struct MISSION_ITEM_INT_DATA {
20060    #[doc = "PARAM1, see MAV_CMD enum"]
20061    pub param1: f32,
20062    #[doc = "PARAM2, see MAV_CMD enum"]
20063    pub param2: f32,
20064    #[doc = "PARAM3, see MAV_CMD enum"]
20065    pub param3: f32,
20066    #[doc = "PARAM4, see MAV_CMD enum"]
20067    pub param4: f32,
20068    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
20069    pub x: i32,
20070    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
20071    pub y: i32,
20072    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
20073    pub z: f32,
20074    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
20075    pub seq: u16,
20076    #[doc = "The scheduled action for the waypoint."]
20077    pub command: MavCmd,
20078    #[doc = "System ID"]
20079    pub target_system: u8,
20080    #[doc = "Component ID"]
20081    pub target_component: u8,
20082    #[doc = "The coordinate system of the waypoint."]
20083    pub frame: MavFrame,
20084    #[doc = "false:0, true:1"]
20085    pub current: u8,
20086    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
20087    pub autocontinue: u8,
20088    #[doc = "Mission type."]
20089    #[cfg_attr(feature = "serde", serde(default))]
20090    pub mission_type: MavMissionType,
20091}
20092impl MISSION_ITEM_INT_DATA {
20093    pub const ENCODED_LEN: usize = 38usize;
20094    pub const DEFAULT: Self = Self {
20095        param1: 0.0_f32,
20096        param2: 0.0_f32,
20097        param3: 0.0_f32,
20098        param4: 0.0_f32,
20099        x: 0_i32,
20100        y: 0_i32,
20101        z: 0.0_f32,
20102        seq: 0_u16,
20103        command: MavCmd::DEFAULT,
20104        target_system: 0_u8,
20105        target_component: 0_u8,
20106        frame: MavFrame::DEFAULT,
20107        current: 0_u8,
20108        autocontinue: 0_u8,
20109        mission_type: MavMissionType::DEFAULT,
20110    };
20111    #[cfg(feature = "arbitrary")]
20112    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20113        use arbitrary::{Arbitrary, Unstructured};
20114        let mut buf = [0u8; 1024];
20115        rng.fill_bytes(&mut buf);
20116        let mut unstructured = Unstructured::new(&buf);
20117        Self::arbitrary(&mut unstructured).unwrap_or_default()
20118    }
20119}
20120impl Default for MISSION_ITEM_INT_DATA {
20121    fn default() -> Self {
20122        Self::DEFAULT.clone()
20123    }
20124}
20125impl MessageData for MISSION_ITEM_INT_DATA {
20126    type Message = MavMessage;
20127    const ID: u32 = 73u32;
20128    const NAME: &'static str = "MISSION_ITEM_INT";
20129    const EXTRA_CRC: u8 = 38u8;
20130    const ENCODED_LEN: usize = 38usize;
20131    fn deser(
20132        _version: MavlinkVersion,
20133        __input: &[u8],
20134    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20135        let avail_len = __input.len();
20136        let mut payload_buf = [0; Self::ENCODED_LEN];
20137        let mut buf = if avail_len < Self::ENCODED_LEN {
20138            payload_buf[0..avail_len].copy_from_slice(__input);
20139            Bytes::new(&payload_buf)
20140        } else {
20141            Bytes::new(__input)
20142        };
20143        let mut __struct = Self::default();
20144        __struct.param1 = buf.get_f32_le();
20145        __struct.param2 = buf.get_f32_le();
20146        __struct.param3 = buf.get_f32_le();
20147        __struct.param4 = buf.get_f32_le();
20148        __struct.x = buf.get_i32_le();
20149        __struct.y = buf.get_i32_le();
20150        __struct.z = buf.get_f32_le();
20151        __struct.seq = buf.get_u16_le();
20152        let tmp = buf.get_u16_le();
20153        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
20154            ::mavlink_core::error::ParserError::InvalidEnum {
20155                enum_type: "MavCmd",
20156                value: tmp as u32,
20157            },
20158        )?;
20159        __struct.target_system = buf.get_u8();
20160        __struct.target_component = buf.get_u8();
20161        let tmp = buf.get_u8();
20162        __struct.frame =
20163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20164                enum_type: "MavFrame",
20165                value: tmp as u32,
20166            })?;
20167        __struct.current = buf.get_u8();
20168        __struct.autocontinue = buf.get_u8();
20169        let tmp = buf.get_u8();
20170        __struct.mission_type =
20171            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20172                enum_type: "MavMissionType",
20173                value: tmp as u32,
20174            })?;
20175        Ok(__struct)
20176    }
20177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20178        let mut __tmp = BytesMut::new(bytes);
20179        #[allow(clippy::absurd_extreme_comparisons)]
20180        #[allow(unused_comparisons)]
20181        if __tmp.remaining() < Self::ENCODED_LEN {
20182            panic!(
20183                "buffer is too small (need {} bytes, but got {})",
20184                Self::ENCODED_LEN,
20185                __tmp.remaining(),
20186            )
20187        }
20188        __tmp.put_f32_le(self.param1);
20189        __tmp.put_f32_le(self.param2);
20190        __tmp.put_f32_le(self.param3);
20191        __tmp.put_f32_le(self.param4);
20192        __tmp.put_i32_le(self.x);
20193        __tmp.put_i32_le(self.y);
20194        __tmp.put_f32_le(self.z);
20195        __tmp.put_u16_le(self.seq);
20196        __tmp.put_u16_le(self.command as u16);
20197        __tmp.put_u8(self.target_system);
20198        __tmp.put_u8(self.target_component);
20199        __tmp.put_u8(self.frame as u8);
20200        __tmp.put_u8(self.current);
20201        __tmp.put_u8(self.autocontinue);
20202        __tmp.put_u8(self.mission_type as u8);
20203        if matches!(version, MavlinkVersion::V2) {
20204            let len = __tmp.len();
20205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20206        } else {
20207            __tmp.len()
20208        }
20209    }
20210}
20211#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
20212#[doc = ""]
20213#[doc = "ID: 46"]
20214#[derive(Debug, Clone, PartialEq)]
20215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20216#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20217pub struct MISSION_ITEM_REACHED_DATA {
20218    #[doc = "Sequence"]
20219    pub seq: u16,
20220}
20221impl MISSION_ITEM_REACHED_DATA {
20222    pub const ENCODED_LEN: usize = 2usize;
20223    pub const DEFAULT: Self = Self { seq: 0_u16 };
20224    #[cfg(feature = "arbitrary")]
20225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20226        use arbitrary::{Arbitrary, Unstructured};
20227        let mut buf = [0u8; 1024];
20228        rng.fill_bytes(&mut buf);
20229        let mut unstructured = Unstructured::new(&buf);
20230        Self::arbitrary(&mut unstructured).unwrap_or_default()
20231    }
20232}
20233impl Default for MISSION_ITEM_REACHED_DATA {
20234    fn default() -> Self {
20235        Self::DEFAULT.clone()
20236    }
20237}
20238impl MessageData for MISSION_ITEM_REACHED_DATA {
20239    type Message = MavMessage;
20240    const ID: u32 = 46u32;
20241    const NAME: &'static str = "MISSION_ITEM_REACHED";
20242    const EXTRA_CRC: u8 = 11u8;
20243    const ENCODED_LEN: usize = 2usize;
20244    fn deser(
20245        _version: MavlinkVersion,
20246        __input: &[u8],
20247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20248        let avail_len = __input.len();
20249        let mut payload_buf = [0; Self::ENCODED_LEN];
20250        let mut buf = if avail_len < Self::ENCODED_LEN {
20251            payload_buf[0..avail_len].copy_from_slice(__input);
20252            Bytes::new(&payload_buf)
20253        } else {
20254            Bytes::new(__input)
20255        };
20256        let mut __struct = Self::default();
20257        __struct.seq = buf.get_u16_le();
20258        Ok(__struct)
20259    }
20260    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20261        let mut __tmp = BytesMut::new(bytes);
20262        #[allow(clippy::absurd_extreme_comparisons)]
20263        #[allow(unused_comparisons)]
20264        if __tmp.remaining() < Self::ENCODED_LEN {
20265            panic!(
20266                "buffer is too small (need {} bytes, but got {})",
20267                Self::ENCODED_LEN,
20268                __tmp.remaining(),
20269            )
20270        }
20271        __tmp.put_u16_le(self.seq);
20272        if matches!(version, MavlinkVersion::V2) {
20273            let len = __tmp.len();
20274            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20275        } else {
20276            __tmp.len()
20277        }
20278    }
20279}
20280#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
20281#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
20282#[doc = ""]
20283#[doc = "ID: 40"]
20284#[derive(Debug, Clone, PartialEq)]
20285#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20286#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20287pub struct MISSION_REQUEST_DATA {
20288    #[doc = "Sequence"]
20289    pub seq: u16,
20290    #[doc = "System ID"]
20291    pub target_system: u8,
20292    #[doc = "Component ID"]
20293    pub target_component: u8,
20294    #[doc = "Mission type."]
20295    #[cfg_attr(feature = "serde", serde(default))]
20296    pub mission_type: MavMissionType,
20297}
20298impl MISSION_REQUEST_DATA {
20299    pub const ENCODED_LEN: usize = 5usize;
20300    pub const DEFAULT: Self = Self {
20301        seq: 0_u16,
20302        target_system: 0_u8,
20303        target_component: 0_u8,
20304        mission_type: MavMissionType::DEFAULT,
20305    };
20306    #[cfg(feature = "arbitrary")]
20307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20308        use arbitrary::{Arbitrary, Unstructured};
20309        let mut buf = [0u8; 1024];
20310        rng.fill_bytes(&mut buf);
20311        let mut unstructured = Unstructured::new(&buf);
20312        Self::arbitrary(&mut unstructured).unwrap_or_default()
20313    }
20314}
20315impl Default for MISSION_REQUEST_DATA {
20316    fn default() -> Self {
20317        Self::DEFAULT.clone()
20318    }
20319}
20320impl MessageData for MISSION_REQUEST_DATA {
20321    type Message = MavMessage;
20322    const ID: u32 = 40u32;
20323    const NAME: &'static str = "MISSION_REQUEST";
20324    const EXTRA_CRC: u8 = 230u8;
20325    const ENCODED_LEN: usize = 5usize;
20326    fn deser(
20327        _version: MavlinkVersion,
20328        __input: &[u8],
20329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20330        let avail_len = __input.len();
20331        let mut payload_buf = [0; Self::ENCODED_LEN];
20332        let mut buf = if avail_len < Self::ENCODED_LEN {
20333            payload_buf[0..avail_len].copy_from_slice(__input);
20334            Bytes::new(&payload_buf)
20335        } else {
20336            Bytes::new(__input)
20337        };
20338        let mut __struct = Self::default();
20339        __struct.seq = buf.get_u16_le();
20340        __struct.target_system = buf.get_u8();
20341        __struct.target_component = buf.get_u8();
20342        let tmp = buf.get_u8();
20343        __struct.mission_type =
20344            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20345                enum_type: "MavMissionType",
20346                value: tmp as u32,
20347            })?;
20348        Ok(__struct)
20349    }
20350    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20351        let mut __tmp = BytesMut::new(bytes);
20352        #[allow(clippy::absurd_extreme_comparisons)]
20353        #[allow(unused_comparisons)]
20354        if __tmp.remaining() < Self::ENCODED_LEN {
20355            panic!(
20356                "buffer is too small (need {} bytes, but got {})",
20357                Self::ENCODED_LEN,
20358                __tmp.remaining(),
20359            )
20360        }
20361        __tmp.put_u16_le(self.seq);
20362        __tmp.put_u8(self.target_system);
20363        __tmp.put_u8(self.target_component);
20364        __tmp.put_u8(self.mission_type as u8);
20365        if matches!(version, MavlinkVersion::V2) {
20366            let len = __tmp.len();
20367            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20368        } else {
20369            __tmp.len()
20370        }
20371    }
20372}
20373#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
20374#[doc = ""]
20375#[doc = "ID: 51"]
20376#[derive(Debug, Clone, PartialEq)]
20377#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20378#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20379pub struct MISSION_REQUEST_INT_DATA {
20380    #[doc = "Sequence"]
20381    pub seq: u16,
20382    #[doc = "System ID"]
20383    pub target_system: u8,
20384    #[doc = "Component ID"]
20385    pub target_component: u8,
20386    #[doc = "Mission type."]
20387    #[cfg_attr(feature = "serde", serde(default))]
20388    pub mission_type: MavMissionType,
20389}
20390impl MISSION_REQUEST_INT_DATA {
20391    pub const ENCODED_LEN: usize = 5usize;
20392    pub const DEFAULT: Self = Self {
20393        seq: 0_u16,
20394        target_system: 0_u8,
20395        target_component: 0_u8,
20396        mission_type: MavMissionType::DEFAULT,
20397    };
20398    #[cfg(feature = "arbitrary")]
20399    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20400        use arbitrary::{Arbitrary, Unstructured};
20401        let mut buf = [0u8; 1024];
20402        rng.fill_bytes(&mut buf);
20403        let mut unstructured = Unstructured::new(&buf);
20404        Self::arbitrary(&mut unstructured).unwrap_or_default()
20405    }
20406}
20407impl Default for MISSION_REQUEST_INT_DATA {
20408    fn default() -> Self {
20409        Self::DEFAULT.clone()
20410    }
20411}
20412impl MessageData for MISSION_REQUEST_INT_DATA {
20413    type Message = MavMessage;
20414    const ID: u32 = 51u32;
20415    const NAME: &'static str = "MISSION_REQUEST_INT";
20416    const EXTRA_CRC: u8 = 196u8;
20417    const ENCODED_LEN: usize = 5usize;
20418    fn deser(
20419        _version: MavlinkVersion,
20420        __input: &[u8],
20421    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20422        let avail_len = __input.len();
20423        let mut payload_buf = [0; Self::ENCODED_LEN];
20424        let mut buf = if avail_len < Self::ENCODED_LEN {
20425            payload_buf[0..avail_len].copy_from_slice(__input);
20426            Bytes::new(&payload_buf)
20427        } else {
20428            Bytes::new(__input)
20429        };
20430        let mut __struct = Self::default();
20431        __struct.seq = buf.get_u16_le();
20432        __struct.target_system = buf.get_u8();
20433        __struct.target_component = buf.get_u8();
20434        let tmp = buf.get_u8();
20435        __struct.mission_type =
20436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20437                enum_type: "MavMissionType",
20438                value: tmp as u32,
20439            })?;
20440        Ok(__struct)
20441    }
20442    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20443        let mut __tmp = BytesMut::new(bytes);
20444        #[allow(clippy::absurd_extreme_comparisons)]
20445        #[allow(unused_comparisons)]
20446        if __tmp.remaining() < Self::ENCODED_LEN {
20447            panic!(
20448                "buffer is too small (need {} bytes, but got {})",
20449                Self::ENCODED_LEN,
20450                __tmp.remaining(),
20451            )
20452        }
20453        __tmp.put_u16_le(self.seq);
20454        __tmp.put_u8(self.target_system);
20455        __tmp.put_u8(self.target_component);
20456        __tmp.put_u8(self.mission_type as u8);
20457        if matches!(version, MavlinkVersion::V2) {
20458            let len = __tmp.len();
20459            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20460        } else {
20461            __tmp.len()
20462        }
20463    }
20464}
20465#[doc = "Request the overall list of mission items from the system/component."]
20466#[doc = ""]
20467#[doc = "ID: 43"]
20468#[derive(Debug, Clone, PartialEq)]
20469#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20470#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20471pub struct MISSION_REQUEST_LIST_DATA {
20472    #[doc = "System ID"]
20473    pub target_system: u8,
20474    #[doc = "Component ID"]
20475    pub target_component: u8,
20476    #[doc = "Mission type."]
20477    #[cfg_attr(feature = "serde", serde(default))]
20478    pub mission_type: MavMissionType,
20479}
20480impl MISSION_REQUEST_LIST_DATA {
20481    pub const ENCODED_LEN: usize = 3usize;
20482    pub const DEFAULT: Self = Self {
20483        target_system: 0_u8,
20484        target_component: 0_u8,
20485        mission_type: MavMissionType::DEFAULT,
20486    };
20487    #[cfg(feature = "arbitrary")]
20488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20489        use arbitrary::{Arbitrary, Unstructured};
20490        let mut buf = [0u8; 1024];
20491        rng.fill_bytes(&mut buf);
20492        let mut unstructured = Unstructured::new(&buf);
20493        Self::arbitrary(&mut unstructured).unwrap_or_default()
20494    }
20495}
20496impl Default for MISSION_REQUEST_LIST_DATA {
20497    fn default() -> Self {
20498        Self::DEFAULT.clone()
20499    }
20500}
20501impl MessageData for MISSION_REQUEST_LIST_DATA {
20502    type Message = MavMessage;
20503    const ID: u32 = 43u32;
20504    const NAME: &'static str = "MISSION_REQUEST_LIST";
20505    const EXTRA_CRC: u8 = 132u8;
20506    const ENCODED_LEN: usize = 3usize;
20507    fn deser(
20508        _version: MavlinkVersion,
20509        __input: &[u8],
20510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20511        let avail_len = __input.len();
20512        let mut payload_buf = [0; Self::ENCODED_LEN];
20513        let mut buf = if avail_len < Self::ENCODED_LEN {
20514            payload_buf[0..avail_len].copy_from_slice(__input);
20515            Bytes::new(&payload_buf)
20516        } else {
20517            Bytes::new(__input)
20518        };
20519        let mut __struct = Self::default();
20520        __struct.target_system = buf.get_u8();
20521        __struct.target_component = buf.get_u8();
20522        let tmp = buf.get_u8();
20523        __struct.mission_type =
20524            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20525                enum_type: "MavMissionType",
20526                value: tmp as u32,
20527            })?;
20528        Ok(__struct)
20529    }
20530    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20531        let mut __tmp = BytesMut::new(bytes);
20532        #[allow(clippy::absurd_extreme_comparisons)]
20533        #[allow(unused_comparisons)]
20534        if __tmp.remaining() < Self::ENCODED_LEN {
20535            panic!(
20536                "buffer is too small (need {} bytes, but got {})",
20537                Self::ENCODED_LEN,
20538                __tmp.remaining(),
20539            )
20540        }
20541        __tmp.put_u8(self.target_system);
20542        __tmp.put_u8(self.target_component);
20543        __tmp.put_u8(self.mission_type as u8);
20544        if matches!(version, MavlinkVersion::V2) {
20545            let len = __tmp.len();
20546            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20547        } else {
20548            __tmp.len()
20549        }
20550    }
20551}
20552#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
20553#[doc = ""]
20554#[doc = "ID: 37"]
20555#[derive(Debug, Clone, PartialEq)]
20556#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20557#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20558pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
20559    #[doc = "Start index"]
20560    pub start_index: i16,
20561    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
20562    pub end_index: i16,
20563    #[doc = "System ID"]
20564    pub target_system: u8,
20565    #[doc = "Component ID"]
20566    pub target_component: u8,
20567    #[doc = "Mission type."]
20568    #[cfg_attr(feature = "serde", serde(default))]
20569    pub mission_type: MavMissionType,
20570}
20571impl MISSION_REQUEST_PARTIAL_LIST_DATA {
20572    pub const ENCODED_LEN: usize = 7usize;
20573    pub const DEFAULT: Self = Self {
20574        start_index: 0_i16,
20575        end_index: 0_i16,
20576        target_system: 0_u8,
20577        target_component: 0_u8,
20578        mission_type: MavMissionType::DEFAULT,
20579    };
20580    #[cfg(feature = "arbitrary")]
20581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20582        use arbitrary::{Arbitrary, Unstructured};
20583        let mut buf = [0u8; 1024];
20584        rng.fill_bytes(&mut buf);
20585        let mut unstructured = Unstructured::new(&buf);
20586        Self::arbitrary(&mut unstructured).unwrap_or_default()
20587    }
20588}
20589impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
20590    fn default() -> Self {
20591        Self::DEFAULT.clone()
20592    }
20593}
20594impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
20595    type Message = MavMessage;
20596    const ID: u32 = 37u32;
20597    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
20598    const EXTRA_CRC: u8 = 212u8;
20599    const ENCODED_LEN: usize = 7usize;
20600    fn deser(
20601        _version: MavlinkVersion,
20602        __input: &[u8],
20603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20604        let avail_len = __input.len();
20605        let mut payload_buf = [0; Self::ENCODED_LEN];
20606        let mut buf = if avail_len < Self::ENCODED_LEN {
20607            payload_buf[0..avail_len].copy_from_slice(__input);
20608            Bytes::new(&payload_buf)
20609        } else {
20610            Bytes::new(__input)
20611        };
20612        let mut __struct = Self::default();
20613        __struct.start_index = buf.get_i16_le();
20614        __struct.end_index = buf.get_i16_le();
20615        __struct.target_system = buf.get_u8();
20616        __struct.target_component = buf.get_u8();
20617        let tmp = buf.get_u8();
20618        __struct.mission_type =
20619            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20620                enum_type: "MavMissionType",
20621                value: tmp as u32,
20622            })?;
20623        Ok(__struct)
20624    }
20625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20626        let mut __tmp = BytesMut::new(bytes);
20627        #[allow(clippy::absurd_extreme_comparisons)]
20628        #[allow(unused_comparisons)]
20629        if __tmp.remaining() < Self::ENCODED_LEN {
20630            panic!(
20631                "buffer is too small (need {} bytes, but got {})",
20632                Self::ENCODED_LEN,
20633                __tmp.remaining(),
20634            )
20635        }
20636        __tmp.put_i16_le(self.start_index);
20637        __tmp.put_i16_le(self.end_index);
20638        __tmp.put_u8(self.target_system);
20639        __tmp.put_u8(self.target_component);
20640        __tmp.put_u8(self.mission_type as u8);
20641        if matches!(version, MavlinkVersion::V2) {
20642            let len = __tmp.len();
20643            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20644        } else {
20645            __tmp.len()
20646        }
20647    }
20648}
20649#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
20650#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
20651#[doc = ""]
20652#[doc = "ID: 41"]
20653#[derive(Debug, Clone, PartialEq)]
20654#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20655#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20656pub struct MISSION_SET_CURRENT_DATA {
20657    #[doc = "Sequence"]
20658    pub seq: u16,
20659    #[doc = "System ID"]
20660    pub target_system: u8,
20661    #[doc = "Component ID"]
20662    pub target_component: u8,
20663}
20664impl MISSION_SET_CURRENT_DATA {
20665    pub const ENCODED_LEN: usize = 4usize;
20666    pub const DEFAULT: Self = Self {
20667        seq: 0_u16,
20668        target_system: 0_u8,
20669        target_component: 0_u8,
20670    };
20671    #[cfg(feature = "arbitrary")]
20672    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20673        use arbitrary::{Arbitrary, Unstructured};
20674        let mut buf = [0u8; 1024];
20675        rng.fill_bytes(&mut buf);
20676        let mut unstructured = Unstructured::new(&buf);
20677        Self::arbitrary(&mut unstructured).unwrap_or_default()
20678    }
20679}
20680impl Default for MISSION_SET_CURRENT_DATA {
20681    fn default() -> Self {
20682        Self::DEFAULT.clone()
20683    }
20684}
20685impl MessageData for MISSION_SET_CURRENT_DATA {
20686    type Message = MavMessage;
20687    const ID: u32 = 41u32;
20688    const NAME: &'static str = "MISSION_SET_CURRENT";
20689    const EXTRA_CRC: u8 = 28u8;
20690    const ENCODED_LEN: usize = 4usize;
20691    fn deser(
20692        _version: MavlinkVersion,
20693        __input: &[u8],
20694    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20695        let avail_len = __input.len();
20696        let mut payload_buf = [0; Self::ENCODED_LEN];
20697        let mut buf = if avail_len < Self::ENCODED_LEN {
20698            payload_buf[0..avail_len].copy_from_slice(__input);
20699            Bytes::new(&payload_buf)
20700        } else {
20701            Bytes::new(__input)
20702        };
20703        let mut __struct = Self::default();
20704        __struct.seq = buf.get_u16_le();
20705        __struct.target_system = buf.get_u8();
20706        __struct.target_component = buf.get_u8();
20707        Ok(__struct)
20708    }
20709    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20710        let mut __tmp = BytesMut::new(bytes);
20711        #[allow(clippy::absurd_extreme_comparisons)]
20712        #[allow(unused_comparisons)]
20713        if __tmp.remaining() < Self::ENCODED_LEN {
20714            panic!(
20715                "buffer is too small (need {} bytes, but got {})",
20716                Self::ENCODED_LEN,
20717                __tmp.remaining(),
20718            )
20719        }
20720        __tmp.put_u16_le(self.seq);
20721        __tmp.put_u8(self.target_system);
20722        __tmp.put_u8(self.target_component);
20723        if matches!(version, MavlinkVersion::V2) {
20724            let len = __tmp.len();
20725            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20726        } else {
20727            __tmp.len()
20728        }
20729    }
20730}
20731#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20732#[doc = ""]
20733#[doc = "ID: 38"]
20734#[derive(Debug, Clone, PartialEq)]
20735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20737pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20738    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20739    pub start_index: i16,
20740    #[doc = "End index, equal or greater than start index."]
20741    pub end_index: i16,
20742    #[doc = "System ID"]
20743    pub target_system: u8,
20744    #[doc = "Component ID"]
20745    pub target_component: u8,
20746    #[doc = "Mission type."]
20747    #[cfg_attr(feature = "serde", serde(default))]
20748    pub mission_type: MavMissionType,
20749}
20750impl MISSION_WRITE_PARTIAL_LIST_DATA {
20751    pub const ENCODED_LEN: usize = 7usize;
20752    pub const DEFAULT: Self = Self {
20753        start_index: 0_i16,
20754        end_index: 0_i16,
20755        target_system: 0_u8,
20756        target_component: 0_u8,
20757        mission_type: MavMissionType::DEFAULT,
20758    };
20759    #[cfg(feature = "arbitrary")]
20760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20761        use arbitrary::{Arbitrary, Unstructured};
20762        let mut buf = [0u8; 1024];
20763        rng.fill_bytes(&mut buf);
20764        let mut unstructured = Unstructured::new(&buf);
20765        Self::arbitrary(&mut unstructured).unwrap_or_default()
20766    }
20767}
20768impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20769    fn default() -> Self {
20770        Self::DEFAULT.clone()
20771    }
20772}
20773impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20774    type Message = MavMessage;
20775    const ID: u32 = 38u32;
20776    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20777    const EXTRA_CRC: u8 = 9u8;
20778    const ENCODED_LEN: usize = 7usize;
20779    fn deser(
20780        _version: MavlinkVersion,
20781        __input: &[u8],
20782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20783        let avail_len = __input.len();
20784        let mut payload_buf = [0; Self::ENCODED_LEN];
20785        let mut buf = if avail_len < Self::ENCODED_LEN {
20786            payload_buf[0..avail_len].copy_from_slice(__input);
20787            Bytes::new(&payload_buf)
20788        } else {
20789            Bytes::new(__input)
20790        };
20791        let mut __struct = Self::default();
20792        __struct.start_index = buf.get_i16_le();
20793        __struct.end_index = buf.get_i16_le();
20794        __struct.target_system = buf.get_u8();
20795        __struct.target_component = buf.get_u8();
20796        let tmp = buf.get_u8();
20797        __struct.mission_type =
20798            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20799                enum_type: "MavMissionType",
20800                value: tmp as u32,
20801            })?;
20802        Ok(__struct)
20803    }
20804    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20805        let mut __tmp = BytesMut::new(bytes);
20806        #[allow(clippy::absurd_extreme_comparisons)]
20807        #[allow(unused_comparisons)]
20808        if __tmp.remaining() < Self::ENCODED_LEN {
20809            panic!(
20810                "buffer is too small (need {} bytes, but got {})",
20811                Self::ENCODED_LEN,
20812                __tmp.remaining(),
20813            )
20814        }
20815        __tmp.put_i16_le(self.start_index);
20816        __tmp.put_i16_le(self.end_index);
20817        __tmp.put_u8(self.target_system);
20818        __tmp.put_u8(self.target_component);
20819        __tmp.put_u8(self.mission_type as u8);
20820        if matches!(version, MavlinkVersion::V2) {
20821            let len = __tmp.len();
20822            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20823        } else {
20824            __tmp.len()
20825        }
20826    }
20827}
20828#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20829#[doc = "Orientation of a mount."]
20830#[doc = ""]
20831#[doc = "ID: 265"]
20832#[derive(Debug, Clone, PartialEq)]
20833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20835pub struct MOUNT_ORIENTATION_DATA {
20836    #[doc = "Timestamp (time since system boot)."]
20837    pub time_boot_ms: u32,
20838    #[doc = "Roll in global frame (set to NaN for invalid)."]
20839    pub roll: f32,
20840    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20841    pub pitch: f32,
20842    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20843    pub yaw: f32,
20844    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20845    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20846    pub yaw_absolute: f32,
20847}
20848impl MOUNT_ORIENTATION_DATA {
20849    pub const ENCODED_LEN: usize = 20usize;
20850    pub const DEFAULT: Self = Self {
20851        time_boot_ms: 0_u32,
20852        roll: 0.0_f32,
20853        pitch: 0.0_f32,
20854        yaw: 0.0_f32,
20855        yaw_absolute: 0.0_f32,
20856    };
20857    #[cfg(feature = "arbitrary")]
20858    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20859        use arbitrary::{Arbitrary, Unstructured};
20860        let mut buf = [0u8; 1024];
20861        rng.fill_bytes(&mut buf);
20862        let mut unstructured = Unstructured::new(&buf);
20863        Self::arbitrary(&mut unstructured).unwrap_or_default()
20864    }
20865}
20866impl Default for MOUNT_ORIENTATION_DATA {
20867    fn default() -> Self {
20868        Self::DEFAULT.clone()
20869    }
20870}
20871impl MessageData for MOUNT_ORIENTATION_DATA {
20872    type Message = MavMessage;
20873    const ID: u32 = 265u32;
20874    const NAME: &'static str = "MOUNT_ORIENTATION";
20875    const EXTRA_CRC: u8 = 26u8;
20876    const ENCODED_LEN: usize = 20usize;
20877    fn deser(
20878        _version: MavlinkVersion,
20879        __input: &[u8],
20880    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20881        let avail_len = __input.len();
20882        let mut payload_buf = [0; Self::ENCODED_LEN];
20883        let mut buf = if avail_len < Self::ENCODED_LEN {
20884            payload_buf[0..avail_len].copy_from_slice(__input);
20885            Bytes::new(&payload_buf)
20886        } else {
20887            Bytes::new(__input)
20888        };
20889        let mut __struct = Self::default();
20890        __struct.time_boot_ms = buf.get_u32_le();
20891        __struct.roll = buf.get_f32_le();
20892        __struct.pitch = buf.get_f32_le();
20893        __struct.yaw = buf.get_f32_le();
20894        __struct.yaw_absolute = buf.get_f32_le();
20895        Ok(__struct)
20896    }
20897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20898        let mut __tmp = BytesMut::new(bytes);
20899        #[allow(clippy::absurd_extreme_comparisons)]
20900        #[allow(unused_comparisons)]
20901        if __tmp.remaining() < Self::ENCODED_LEN {
20902            panic!(
20903                "buffer is too small (need {} bytes, but got {})",
20904                Self::ENCODED_LEN,
20905                __tmp.remaining(),
20906            )
20907        }
20908        __tmp.put_u32_le(self.time_boot_ms);
20909        __tmp.put_f32_le(self.roll);
20910        __tmp.put_f32_le(self.pitch);
20911        __tmp.put_f32_le(self.yaw);
20912        __tmp.put_f32_le(self.yaw_absolute);
20913        if matches!(version, MavlinkVersion::V2) {
20914            let len = __tmp.len();
20915            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20916        } else {
20917            __tmp.len()
20918        }
20919    }
20920}
20921#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20922#[doc = ""]
20923#[doc = "ID: 251"]
20924#[derive(Debug, Clone, PartialEq)]
20925#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20926#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20927pub struct NAMED_VALUE_FLOAT_DATA {
20928    #[doc = "Timestamp (time since system boot)."]
20929    pub time_boot_ms: u32,
20930    #[doc = "Floating point value"]
20931    pub value: f32,
20932    #[doc = "Name of the debug variable"]
20933    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20934    pub name: [u8; 10],
20935}
20936impl NAMED_VALUE_FLOAT_DATA {
20937    pub const ENCODED_LEN: usize = 18usize;
20938    pub const DEFAULT: Self = Self {
20939        time_boot_ms: 0_u32,
20940        value: 0.0_f32,
20941        name: [0_u8; 10usize],
20942    };
20943    #[cfg(feature = "arbitrary")]
20944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20945        use arbitrary::{Arbitrary, Unstructured};
20946        let mut buf = [0u8; 1024];
20947        rng.fill_bytes(&mut buf);
20948        let mut unstructured = Unstructured::new(&buf);
20949        Self::arbitrary(&mut unstructured).unwrap_or_default()
20950    }
20951}
20952impl Default for NAMED_VALUE_FLOAT_DATA {
20953    fn default() -> Self {
20954        Self::DEFAULT.clone()
20955    }
20956}
20957impl MessageData for NAMED_VALUE_FLOAT_DATA {
20958    type Message = MavMessage;
20959    const ID: u32 = 251u32;
20960    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20961    const EXTRA_CRC: u8 = 170u8;
20962    const ENCODED_LEN: usize = 18usize;
20963    fn deser(
20964        _version: MavlinkVersion,
20965        __input: &[u8],
20966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20967        let avail_len = __input.len();
20968        let mut payload_buf = [0; Self::ENCODED_LEN];
20969        let mut buf = if avail_len < Self::ENCODED_LEN {
20970            payload_buf[0..avail_len].copy_from_slice(__input);
20971            Bytes::new(&payload_buf)
20972        } else {
20973            Bytes::new(__input)
20974        };
20975        let mut __struct = Self::default();
20976        __struct.time_boot_ms = buf.get_u32_le();
20977        __struct.value = buf.get_f32_le();
20978        for v in &mut __struct.name {
20979            let val = buf.get_u8();
20980            *v = val;
20981        }
20982        Ok(__struct)
20983    }
20984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20985        let mut __tmp = BytesMut::new(bytes);
20986        #[allow(clippy::absurd_extreme_comparisons)]
20987        #[allow(unused_comparisons)]
20988        if __tmp.remaining() < Self::ENCODED_LEN {
20989            panic!(
20990                "buffer is too small (need {} bytes, but got {})",
20991                Self::ENCODED_LEN,
20992                __tmp.remaining(),
20993            )
20994        }
20995        __tmp.put_u32_le(self.time_boot_ms);
20996        __tmp.put_f32_le(self.value);
20997        for val in &self.name {
20998            __tmp.put_u8(*val);
20999        }
21000        if matches!(version, MavlinkVersion::V2) {
21001            let len = __tmp.len();
21002            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21003        } else {
21004            __tmp.len()
21005        }
21006    }
21007}
21008#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
21009#[doc = ""]
21010#[doc = "ID: 252"]
21011#[derive(Debug, Clone, PartialEq)]
21012#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21013#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21014pub struct NAMED_VALUE_INT_DATA {
21015    #[doc = "Timestamp (time since system boot)."]
21016    pub time_boot_ms: u32,
21017    #[doc = "Signed integer value"]
21018    pub value: i32,
21019    #[doc = "Name of the debug variable"]
21020    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21021    pub name: [u8; 10],
21022}
21023impl NAMED_VALUE_INT_DATA {
21024    pub const ENCODED_LEN: usize = 18usize;
21025    pub const DEFAULT: Self = Self {
21026        time_boot_ms: 0_u32,
21027        value: 0_i32,
21028        name: [0_u8; 10usize],
21029    };
21030    #[cfg(feature = "arbitrary")]
21031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21032        use arbitrary::{Arbitrary, Unstructured};
21033        let mut buf = [0u8; 1024];
21034        rng.fill_bytes(&mut buf);
21035        let mut unstructured = Unstructured::new(&buf);
21036        Self::arbitrary(&mut unstructured).unwrap_or_default()
21037    }
21038}
21039impl Default for NAMED_VALUE_INT_DATA {
21040    fn default() -> Self {
21041        Self::DEFAULT.clone()
21042    }
21043}
21044impl MessageData for NAMED_VALUE_INT_DATA {
21045    type Message = MavMessage;
21046    const ID: u32 = 252u32;
21047    const NAME: &'static str = "NAMED_VALUE_INT";
21048    const EXTRA_CRC: u8 = 44u8;
21049    const ENCODED_LEN: usize = 18usize;
21050    fn deser(
21051        _version: MavlinkVersion,
21052        __input: &[u8],
21053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21054        let avail_len = __input.len();
21055        let mut payload_buf = [0; Self::ENCODED_LEN];
21056        let mut buf = if avail_len < Self::ENCODED_LEN {
21057            payload_buf[0..avail_len].copy_from_slice(__input);
21058            Bytes::new(&payload_buf)
21059        } else {
21060            Bytes::new(__input)
21061        };
21062        let mut __struct = Self::default();
21063        __struct.time_boot_ms = buf.get_u32_le();
21064        __struct.value = buf.get_i32_le();
21065        for v in &mut __struct.name {
21066            let val = buf.get_u8();
21067            *v = val;
21068        }
21069        Ok(__struct)
21070    }
21071    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21072        let mut __tmp = BytesMut::new(bytes);
21073        #[allow(clippy::absurd_extreme_comparisons)]
21074        #[allow(unused_comparisons)]
21075        if __tmp.remaining() < Self::ENCODED_LEN {
21076            panic!(
21077                "buffer is too small (need {} bytes, but got {})",
21078                Self::ENCODED_LEN,
21079                __tmp.remaining(),
21080            )
21081        }
21082        __tmp.put_u32_le(self.time_boot_ms);
21083        __tmp.put_i32_le(self.value);
21084        for val in &self.name {
21085            __tmp.put_u8(*val);
21086        }
21087        if matches!(version, MavlinkVersion::V2) {
21088            let len = __tmp.len();
21089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21090        } else {
21091            __tmp.len()
21092        }
21093    }
21094}
21095#[doc = "The state of the navigation and position controller."]
21096#[doc = ""]
21097#[doc = "ID: 62"]
21098#[derive(Debug, Clone, PartialEq)]
21099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21101pub struct NAV_CONTROLLER_OUTPUT_DATA {
21102    #[doc = "Current desired roll"]
21103    pub nav_roll: f32,
21104    #[doc = "Current desired pitch"]
21105    pub nav_pitch: f32,
21106    #[doc = "Current altitude error"]
21107    pub alt_error: f32,
21108    #[doc = "Current airspeed error"]
21109    pub aspd_error: f32,
21110    #[doc = "Current crosstrack error on x-y plane"]
21111    pub xtrack_error: f32,
21112    #[doc = "Current desired heading"]
21113    pub nav_bearing: i16,
21114    #[doc = "Bearing to current waypoint/target"]
21115    pub target_bearing: i16,
21116    #[doc = "Distance to active waypoint"]
21117    pub wp_dist: u16,
21118}
21119impl NAV_CONTROLLER_OUTPUT_DATA {
21120    pub const ENCODED_LEN: usize = 26usize;
21121    pub const DEFAULT: Self = Self {
21122        nav_roll: 0.0_f32,
21123        nav_pitch: 0.0_f32,
21124        alt_error: 0.0_f32,
21125        aspd_error: 0.0_f32,
21126        xtrack_error: 0.0_f32,
21127        nav_bearing: 0_i16,
21128        target_bearing: 0_i16,
21129        wp_dist: 0_u16,
21130    };
21131    #[cfg(feature = "arbitrary")]
21132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21133        use arbitrary::{Arbitrary, Unstructured};
21134        let mut buf = [0u8; 1024];
21135        rng.fill_bytes(&mut buf);
21136        let mut unstructured = Unstructured::new(&buf);
21137        Self::arbitrary(&mut unstructured).unwrap_or_default()
21138    }
21139}
21140impl Default for NAV_CONTROLLER_OUTPUT_DATA {
21141    fn default() -> Self {
21142        Self::DEFAULT.clone()
21143    }
21144}
21145impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
21146    type Message = MavMessage;
21147    const ID: u32 = 62u32;
21148    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
21149    const EXTRA_CRC: u8 = 183u8;
21150    const ENCODED_LEN: usize = 26usize;
21151    fn deser(
21152        _version: MavlinkVersion,
21153        __input: &[u8],
21154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21155        let avail_len = __input.len();
21156        let mut payload_buf = [0; Self::ENCODED_LEN];
21157        let mut buf = if avail_len < Self::ENCODED_LEN {
21158            payload_buf[0..avail_len].copy_from_slice(__input);
21159            Bytes::new(&payload_buf)
21160        } else {
21161            Bytes::new(__input)
21162        };
21163        let mut __struct = Self::default();
21164        __struct.nav_roll = buf.get_f32_le();
21165        __struct.nav_pitch = buf.get_f32_le();
21166        __struct.alt_error = buf.get_f32_le();
21167        __struct.aspd_error = buf.get_f32_le();
21168        __struct.xtrack_error = buf.get_f32_le();
21169        __struct.nav_bearing = buf.get_i16_le();
21170        __struct.target_bearing = buf.get_i16_le();
21171        __struct.wp_dist = buf.get_u16_le();
21172        Ok(__struct)
21173    }
21174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21175        let mut __tmp = BytesMut::new(bytes);
21176        #[allow(clippy::absurd_extreme_comparisons)]
21177        #[allow(unused_comparisons)]
21178        if __tmp.remaining() < Self::ENCODED_LEN {
21179            panic!(
21180                "buffer is too small (need {} bytes, but got {})",
21181                Self::ENCODED_LEN,
21182                __tmp.remaining(),
21183            )
21184        }
21185        __tmp.put_f32_le(self.nav_roll);
21186        __tmp.put_f32_le(self.nav_pitch);
21187        __tmp.put_f32_le(self.alt_error);
21188        __tmp.put_f32_le(self.aspd_error);
21189        __tmp.put_f32_le(self.xtrack_error);
21190        __tmp.put_i16_le(self.nav_bearing);
21191        __tmp.put_i16_le(self.target_bearing);
21192        __tmp.put_u16_le(self.wp_dist);
21193        if matches!(version, MavlinkVersion::V2) {
21194            let len = __tmp.len();
21195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21196        } else {
21197            __tmp.len()
21198        }
21199    }
21200}
21201#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
21202#[doc = ""]
21203#[doc = "ID: 330"]
21204#[derive(Debug, Clone, PartialEq)]
21205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21206#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21207pub struct OBSTACLE_DISTANCE_DATA {
21208    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21209    pub time_usec: u64,
21210    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
21211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21212    pub distances: [u16; 72],
21213    #[doc = "Minimum distance the sensor can measure."]
21214    pub min_distance: u16,
21215    #[doc = "Maximum distance the sensor can measure."]
21216    pub max_distance: u16,
21217    #[doc = "Class id of the distance sensor type."]
21218    pub sensor_type: MavDistanceSensor,
21219    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
21220    pub increment: u8,
21221    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
21222    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21223    pub increment_f: f32,
21224    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
21225    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21226    pub angle_offset: f32,
21227    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
21228    #[cfg_attr(feature = "serde", serde(default))]
21229    pub frame: MavFrame,
21230}
21231impl OBSTACLE_DISTANCE_DATA {
21232    pub const ENCODED_LEN: usize = 167usize;
21233    pub const DEFAULT: Self = Self {
21234        time_usec: 0_u64,
21235        distances: [0_u16; 72usize],
21236        min_distance: 0_u16,
21237        max_distance: 0_u16,
21238        sensor_type: MavDistanceSensor::DEFAULT,
21239        increment: 0_u8,
21240        increment_f: 0.0_f32,
21241        angle_offset: 0.0_f32,
21242        frame: MavFrame::DEFAULT,
21243    };
21244    #[cfg(feature = "arbitrary")]
21245    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21246        use arbitrary::{Arbitrary, Unstructured};
21247        let mut buf = [0u8; 1024];
21248        rng.fill_bytes(&mut buf);
21249        let mut unstructured = Unstructured::new(&buf);
21250        Self::arbitrary(&mut unstructured).unwrap_or_default()
21251    }
21252}
21253impl Default for OBSTACLE_DISTANCE_DATA {
21254    fn default() -> Self {
21255        Self::DEFAULT.clone()
21256    }
21257}
21258impl MessageData for OBSTACLE_DISTANCE_DATA {
21259    type Message = MavMessage;
21260    const ID: u32 = 330u32;
21261    const NAME: &'static str = "OBSTACLE_DISTANCE";
21262    const EXTRA_CRC: u8 = 23u8;
21263    const ENCODED_LEN: usize = 167usize;
21264    fn deser(
21265        _version: MavlinkVersion,
21266        __input: &[u8],
21267    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21268        let avail_len = __input.len();
21269        let mut payload_buf = [0; Self::ENCODED_LEN];
21270        let mut buf = if avail_len < Self::ENCODED_LEN {
21271            payload_buf[0..avail_len].copy_from_slice(__input);
21272            Bytes::new(&payload_buf)
21273        } else {
21274            Bytes::new(__input)
21275        };
21276        let mut __struct = Self::default();
21277        __struct.time_usec = buf.get_u64_le();
21278        for v in &mut __struct.distances {
21279            let val = buf.get_u16_le();
21280            *v = val;
21281        }
21282        __struct.min_distance = buf.get_u16_le();
21283        __struct.max_distance = buf.get_u16_le();
21284        let tmp = buf.get_u8();
21285        __struct.sensor_type =
21286            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21287                enum_type: "MavDistanceSensor",
21288                value: tmp as u32,
21289            })?;
21290        __struct.increment = buf.get_u8();
21291        __struct.increment_f = buf.get_f32_le();
21292        __struct.angle_offset = buf.get_f32_le();
21293        let tmp = buf.get_u8();
21294        __struct.frame =
21295            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21296                enum_type: "MavFrame",
21297                value: tmp as u32,
21298            })?;
21299        Ok(__struct)
21300    }
21301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21302        let mut __tmp = BytesMut::new(bytes);
21303        #[allow(clippy::absurd_extreme_comparisons)]
21304        #[allow(unused_comparisons)]
21305        if __tmp.remaining() < Self::ENCODED_LEN {
21306            panic!(
21307                "buffer is too small (need {} bytes, but got {})",
21308                Self::ENCODED_LEN,
21309                __tmp.remaining(),
21310            )
21311        }
21312        __tmp.put_u64_le(self.time_usec);
21313        for val in &self.distances {
21314            __tmp.put_u16_le(*val);
21315        }
21316        __tmp.put_u16_le(self.min_distance);
21317        __tmp.put_u16_le(self.max_distance);
21318        __tmp.put_u8(self.sensor_type as u8);
21319        __tmp.put_u8(self.increment);
21320        __tmp.put_f32_le(self.increment_f);
21321        __tmp.put_f32_le(self.angle_offset);
21322        __tmp.put_u8(self.frame as u8);
21323        if matches!(version, MavlinkVersion::V2) {
21324            let len = __tmp.len();
21325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21326        } else {
21327            __tmp.len()
21328        }
21329    }
21330}
21331#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
21332#[doc = ""]
21333#[doc = "ID: 331"]
21334#[derive(Debug, Clone, PartialEq)]
21335#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21336#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21337pub struct ODOMETRY_DATA {
21338    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21339    pub time_usec: u64,
21340    #[doc = "X Position"]
21341    pub x: f32,
21342    #[doc = "Y Position"]
21343    pub y: f32,
21344    #[doc = "Z Position"]
21345    pub z: f32,
21346    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
21347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21348    pub q: [f32; 4],
21349    #[doc = "X linear speed"]
21350    pub vx: f32,
21351    #[doc = "Y linear speed"]
21352    pub vy: f32,
21353    #[doc = "Z linear speed"]
21354    pub vz: f32,
21355    #[doc = "Roll angular speed"]
21356    pub rollspeed: f32,
21357    #[doc = "Pitch angular speed"]
21358    pub pitchspeed: f32,
21359    #[doc = "Yaw angular speed"]
21360    pub yawspeed: f32,
21361    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21363    pub pose_covariance: [f32; 21],
21364    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
21365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21366    pub velocity_covariance: [f32; 21],
21367    #[doc = "Coordinate frame of reference for the pose data."]
21368    pub frame_id: MavFrame,
21369    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
21370    pub child_frame_id: MavFrame,
21371    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
21372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21373    pub reset_counter: u8,
21374    #[doc = "Type of estimator that is providing the odometry."]
21375    #[cfg_attr(feature = "serde", serde(default))]
21376    pub estimator_type: MavEstimatorType,
21377    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
21378    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21379    pub quality: i8,
21380}
21381impl ODOMETRY_DATA {
21382    pub const ENCODED_LEN: usize = 233usize;
21383    pub const DEFAULT: Self = Self {
21384        time_usec: 0_u64,
21385        x: 0.0_f32,
21386        y: 0.0_f32,
21387        z: 0.0_f32,
21388        q: [0.0_f32; 4usize],
21389        vx: 0.0_f32,
21390        vy: 0.0_f32,
21391        vz: 0.0_f32,
21392        rollspeed: 0.0_f32,
21393        pitchspeed: 0.0_f32,
21394        yawspeed: 0.0_f32,
21395        pose_covariance: [0.0_f32; 21usize],
21396        velocity_covariance: [0.0_f32; 21usize],
21397        frame_id: MavFrame::DEFAULT,
21398        child_frame_id: MavFrame::DEFAULT,
21399        reset_counter: 0_u8,
21400        estimator_type: MavEstimatorType::DEFAULT,
21401        quality: 0_i8,
21402    };
21403    #[cfg(feature = "arbitrary")]
21404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21405        use arbitrary::{Arbitrary, Unstructured};
21406        let mut buf = [0u8; 1024];
21407        rng.fill_bytes(&mut buf);
21408        let mut unstructured = Unstructured::new(&buf);
21409        Self::arbitrary(&mut unstructured).unwrap_or_default()
21410    }
21411}
21412impl Default for ODOMETRY_DATA {
21413    fn default() -> Self {
21414        Self::DEFAULT.clone()
21415    }
21416}
21417impl MessageData for ODOMETRY_DATA {
21418    type Message = MavMessage;
21419    const ID: u32 = 331u32;
21420    const NAME: &'static str = "ODOMETRY";
21421    const EXTRA_CRC: u8 = 91u8;
21422    const ENCODED_LEN: usize = 233usize;
21423    fn deser(
21424        _version: MavlinkVersion,
21425        __input: &[u8],
21426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21427        let avail_len = __input.len();
21428        let mut payload_buf = [0; Self::ENCODED_LEN];
21429        let mut buf = if avail_len < Self::ENCODED_LEN {
21430            payload_buf[0..avail_len].copy_from_slice(__input);
21431            Bytes::new(&payload_buf)
21432        } else {
21433            Bytes::new(__input)
21434        };
21435        let mut __struct = Self::default();
21436        __struct.time_usec = buf.get_u64_le();
21437        __struct.x = buf.get_f32_le();
21438        __struct.y = buf.get_f32_le();
21439        __struct.z = buf.get_f32_le();
21440        for v in &mut __struct.q {
21441            let val = buf.get_f32_le();
21442            *v = val;
21443        }
21444        __struct.vx = buf.get_f32_le();
21445        __struct.vy = buf.get_f32_le();
21446        __struct.vz = buf.get_f32_le();
21447        __struct.rollspeed = buf.get_f32_le();
21448        __struct.pitchspeed = buf.get_f32_le();
21449        __struct.yawspeed = buf.get_f32_le();
21450        for v in &mut __struct.pose_covariance {
21451            let val = buf.get_f32_le();
21452            *v = val;
21453        }
21454        for v in &mut __struct.velocity_covariance {
21455            let val = buf.get_f32_le();
21456            *v = val;
21457        }
21458        let tmp = buf.get_u8();
21459        __struct.frame_id =
21460            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21461                enum_type: "MavFrame",
21462                value: tmp as u32,
21463            })?;
21464        let tmp = buf.get_u8();
21465        __struct.child_frame_id =
21466            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21467                enum_type: "MavFrame",
21468                value: tmp as u32,
21469            })?;
21470        __struct.reset_counter = buf.get_u8();
21471        let tmp = buf.get_u8();
21472        __struct.estimator_type =
21473            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21474                enum_type: "MavEstimatorType",
21475                value: tmp as u32,
21476            })?;
21477        __struct.quality = buf.get_i8();
21478        Ok(__struct)
21479    }
21480    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21481        let mut __tmp = BytesMut::new(bytes);
21482        #[allow(clippy::absurd_extreme_comparisons)]
21483        #[allow(unused_comparisons)]
21484        if __tmp.remaining() < Self::ENCODED_LEN {
21485            panic!(
21486                "buffer is too small (need {} bytes, but got {})",
21487                Self::ENCODED_LEN,
21488                __tmp.remaining(),
21489            )
21490        }
21491        __tmp.put_u64_le(self.time_usec);
21492        __tmp.put_f32_le(self.x);
21493        __tmp.put_f32_le(self.y);
21494        __tmp.put_f32_le(self.z);
21495        for val in &self.q {
21496            __tmp.put_f32_le(*val);
21497        }
21498        __tmp.put_f32_le(self.vx);
21499        __tmp.put_f32_le(self.vy);
21500        __tmp.put_f32_le(self.vz);
21501        __tmp.put_f32_le(self.rollspeed);
21502        __tmp.put_f32_le(self.pitchspeed);
21503        __tmp.put_f32_le(self.yawspeed);
21504        for val in &self.pose_covariance {
21505            __tmp.put_f32_le(*val);
21506        }
21507        for val in &self.velocity_covariance {
21508            __tmp.put_f32_le(*val);
21509        }
21510        __tmp.put_u8(self.frame_id as u8);
21511        __tmp.put_u8(self.child_frame_id as u8);
21512        __tmp.put_u8(self.reset_counter);
21513        __tmp.put_u8(self.estimator_type as u8);
21514        __tmp.put_i8(self.quality);
21515        if matches!(version, MavlinkVersion::V2) {
21516            let len = __tmp.len();
21517            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21518        } else {
21519            __tmp.len()
21520        }
21521    }
21522}
21523#[doc = "Hardware status sent by an onboard computer."]
21524#[doc = ""]
21525#[doc = "ID: 390"]
21526#[derive(Debug, Clone, PartialEq)]
21527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21529pub struct ONBOARD_COMPUTER_STATUS_DATA {
21530    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21531    pub time_usec: u64,
21532    #[doc = "Time since system boot."]
21533    pub uptime: u32,
21534    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21535    pub ram_usage: u32,
21536    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
21537    pub ram_total: u32,
21538    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
21539    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21540    pub storage_type: [u32; 4],
21541    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21542    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21543    pub storage_usage: [u32; 4],
21544    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
21545    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21546    pub storage_total: [u32; 4],
21547    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
21548    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21549    pub link_type: [u32; 6],
21550    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
21551    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21552    pub link_tx_rate: [u32; 6],
21553    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
21554    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21555    pub link_rx_rate: [u32; 6],
21556    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
21557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21558    pub link_tx_max: [u32; 6],
21559    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
21560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21561    pub link_rx_max: [u32; 6],
21562    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
21563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21564    pub fan_speed: [i16; 4],
21565    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
21566    pub mavtype: u8,
21567    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21568    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21569    pub cpu_cores: [u8; 8],
21570    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21571    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21572    pub cpu_combined: [u8; 10],
21573    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
21574    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21575    pub gpu_cores: [u8; 4],
21576    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
21577    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21578    pub gpu_combined: [u8; 10],
21579    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
21580    pub temperature_board: i8,
21581    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
21582    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21583    pub temperature_core: [i8; 8],
21584}
21585impl ONBOARD_COMPUTER_STATUS_DATA {
21586    pub const ENCODED_LEN: usize = 238usize;
21587    pub const DEFAULT: Self = Self {
21588        time_usec: 0_u64,
21589        uptime: 0_u32,
21590        ram_usage: 0_u32,
21591        ram_total: 0_u32,
21592        storage_type: [0_u32; 4usize],
21593        storage_usage: [0_u32; 4usize],
21594        storage_total: [0_u32; 4usize],
21595        link_type: [0_u32; 6usize],
21596        link_tx_rate: [0_u32; 6usize],
21597        link_rx_rate: [0_u32; 6usize],
21598        link_tx_max: [0_u32; 6usize],
21599        link_rx_max: [0_u32; 6usize],
21600        fan_speed: [0_i16; 4usize],
21601        mavtype: 0_u8,
21602        cpu_cores: [0_u8; 8usize],
21603        cpu_combined: [0_u8; 10usize],
21604        gpu_cores: [0_u8; 4usize],
21605        gpu_combined: [0_u8; 10usize],
21606        temperature_board: 0_i8,
21607        temperature_core: [0_i8; 8usize],
21608    };
21609    #[cfg(feature = "arbitrary")]
21610    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21611        use arbitrary::{Arbitrary, Unstructured};
21612        let mut buf = [0u8; 1024];
21613        rng.fill_bytes(&mut buf);
21614        let mut unstructured = Unstructured::new(&buf);
21615        Self::arbitrary(&mut unstructured).unwrap_or_default()
21616    }
21617}
21618impl Default for ONBOARD_COMPUTER_STATUS_DATA {
21619    fn default() -> Self {
21620        Self::DEFAULT.clone()
21621    }
21622}
21623impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
21624    type Message = MavMessage;
21625    const ID: u32 = 390u32;
21626    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
21627    const EXTRA_CRC: u8 = 156u8;
21628    const ENCODED_LEN: usize = 238usize;
21629    fn deser(
21630        _version: MavlinkVersion,
21631        __input: &[u8],
21632    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21633        let avail_len = __input.len();
21634        let mut payload_buf = [0; Self::ENCODED_LEN];
21635        let mut buf = if avail_len < Self::ENCODED_LEN {
21636            payload_buf[0..avail_len].copy_from_slice(__input);
21637            Bytes::new(&payload_buf)
21638        } else {
21639            Bytes::new(__input)
21640        };
21641        let mut __struct = Self::default();
21642        __struct.time_usec = buf.get_u64_le();
21643        __struct.uptime = buf.get_u32_le();
21644        __struct.ram_usage = buf.get_u32_le();
21645        __struct.ram_total = buf.get_u32_le();
21646        for v in &mut __struct.storage_type {
21647            let val = buf.get_u32_le();
21648            *v = val;
21649        }
21650        for v in &mut __struct.storage_usage {
21651            let val = buf.get_u32_le();
21652            *v = val;
21653        }
21654        for v in &mut __struct.storage_total {
21655            let val = buf.get_u32_le();
21656            *v = val;
21657        }
21658        for v in &mut __struct.link_type {
21659            let val = buf.get_u32_le();
21660            *v = val;
21661        }
21662        for v in &mut __struct.link_tx_rate {
21663            let val = buf.get_u32_le();
21664            *v = val;
21665        }
21666        for v in &mut __struct.link_rx_rate {
21667            let val = buf.get_u32_le();
21668            *v = val;
21669        }
21670        for v in &mut __struct.link_tx_max {
21671            let val = buf.get_u32_le();
21672            *v = val;
21673        }
21674        for v in &mut __struct.link_rx_max {
21675            let val = buf.get_u32_le();
21676            *v = val;
21677        }
21678        for v in &mut __struct.fan_speed {
21679            let val = buf.get_i16_le();
21680            *v = val;
21681        }
21682        __struct.mavtype = buf.get_u8();
21683        for v in &mut __struct.cpu_cores {
21684            let val = buf.get_u8();
21685            *v = val;
21686        }
21687        for v in &mut __struct.cpu_combined {
21688            let val = buf.get_u8();
21689            *v = val;
21690        }
21691        for v in &mut __struct.gpu_cores {
21692            let val = buf.get_u8();
21693            *v = val;
21694        }
21695        for v in &mut __struct.gpu_combined {
21696            let val = buf.get_u8();
21697            *v = val;
21698        }
21699        __struct.temperature_board = buf.get_i8();
21700        for v in &mut __struct.temperature_core {
21701            let val = buf.get_i8();
21702            *v = val;
21703        }
21704        Ok(__struct)
21705    }
21706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21707        let mut __tmp = BytesMut::new(bytes);
21708        #[allow(clippy::absurd_extreme_comparisons)]
21709        #[allow(unused_comparisons)]
21710        if __tmp.remaining() < Self::ENCODED_LEN {
21711            panic!(
21712                "buffer is too small (need {} bytes, but got {})",
21713                Self::ENCODED_LEN,
21714                __tmp.remaining(),
21715            )
21716        }
21717        __tmp.put_u64_le(self.time_usec);
21718        __tmp.put_u32_le(self.uptime);
21719        __tmp.put_u32_le(self.ram_usage);
21720        __tmp.put_u32_le(self.ram_total);
21721        for val in &self.storage_type {
21722            __tmp.put_u32_le(*val);
21723        }
21724        for val in &self.storage_usage {
21725            __tmp.put_u32_le(*val);
21726        }
21727        for val in &self.storage_total {
21728            __tmp.put_u32_le(*val);
21729        }
21730        for val in &self.link_type {
21731            __tmp.put_u32_le(*val);
21732        }
21733        for val in &self.link_tx_rate {
21734            __tmp.put_u32_le(*val);
21735        }
21736        for val in &self.link_rx_rate {
21737            __tmp.put_u32_le(*val);
21738        }
21739        for val in &self.link_tx_max {
21740            __tmp.put_u32_le(*val);
21741        }
21742        for val in &self.link_rx_max {
21743            __tmp.put_u32_le(*val);
21744        }
21745        for val in &self.fan_speed {
21746            __tmp.put_i16_le(*val);
21747        }
21748        __tmp.put_u8(self.mavtype);
21749        for val in &self.cpu_cores {
21750            __tmp.put_u8(*val);
21751        }
21752        for val in &self.cpu_combined {
21753            __tmp.put_u8(*val);
21754        }
21755        for val in &self.gpu_cores {
21756            __tmp.put_u8(*val);
21757        }
21758        for val in &self.gpu_combined {
21759            __tmp.put_u8(*val);
21760        }
21761        __tmp.put_i8(self.temperature_board);
21762        for val in &self.temperature_core {
21763            __tmp.put_i8(*val);
21764        }
21765        if matches!(version, MavlinkVersion::V2) {
21766            let len = __tmp.len();
21767            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21768        } else {
21769            __tmp.len()
21770        }
21771    }
21772}
21773#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21774#[doc = ""]
21775#[doc = "ID: 12918"]
21776#[derive(Debug, Clone, PartialEq)]
21777#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21778#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21779pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21780    #[doc = "Status level indicating if arming is allowed."]
21781    pub status: MavOdidArmStatus,
21782    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21783    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21784    pub error: [u8; 50],
21785}
21786impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21787    pub const ENCODED_LEN: usize = 51usize;
21788    pub const DEFAULT: Self = Self {
21789        status: MavOdidArmStatus::DEFAULT,
21790        error: [0_u8; 50usize],
21791    };
21792    #[cfg(feature = "arbitrary")]
21793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21794        use arbitrary::{Arbitrary, Unstructured};
21795        let mut buf = [0u8; 1024];
21796        rng.fill_bytes(&mut buf);
21797        let mut unstructured = Unstructured::new(&buf);
21798        Self::arbitrary(&mut unstructured).unwrap_or_default()
21799    }
21800}
21801impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21802    fn default() -> Self {
21803        Self::DEFAULT.clone()
21804    }
21805}
21806impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21807    type Message = MavMessage;
21808    const ID: u32 = 12918u32;
21809    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21810    const EXTRA_CRC: u8 = 139u8;
21811    const ENCODED_LEN: usize = 51usize;
21812    fn deser(
21813        _version: MavlinkVersion,
21814        __input: &[u8],
21815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21816        let avail_len = __input.len();
21817        let mut payload_buf = [0; Self::ENCODED_LEN];
21818        let mut buf = if avail_len < Self::ENCODED_LEN {
21819            payload_buf[0..avail_len].copy_from_slice(__input);
21820            Bytes::new(&payload_buf)
21821        } else {
21822            Bytes::new(__input)
21823        };
21824        let mut __struct = Self::default();
21825        let tmp = buf.get_u8();
21826        __struct.status =
21827            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21828                enum_type: "MavOdidArmStatus",
21829                value: tmp as u32,
21830            })?;
21831        for v in &mut __struct.error {
21832            let val = buf.get_u8();
21833            *v = val;
21834        }
21835        Ok(__struct)
21836    }
21837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21838        let mut __tmp = BytesMut::new(bytes);
21839        #[allow(clippy::absurd_extreme_comparisons)]
21840        #[allow(unused_comparisons)]
21841        if __tmp.remaining() < Self::ENCODED_LEN {
21842            panic!(
21843                "buffer is too small (need {} bytes, but got {})",
21844                Self::ENCODED_LEN,
21845                __tmp.remaining(),
21846            )
21847        }
21848        __tmp.put_u8(self.status as u8);
21849        for val in &self.error {
21850            __tmp.put_u8(*val);
21851        }
21852        if matches!(version, MavlinkVersion::V2) {
21853            let len = __tmp.len();
21854            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21855        } else {
21856            __tmp.len()
21857        }
21858    }
21859}
21860#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21861#[doc = ""]
21862#[doc = "ID: 12902"]
21863#[derive(Debug, Clone, PartialEq)]
21864#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21865#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21866pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21867    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21868    pub timestamp: u32,
21869    #[doc = "System ID (0 for broadcast)."]
21870    pub target_system: u8,
21871    #[doc = "Component ID (0 for broadcast)."]
21872    pub target_component: u8,
21873    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21875    pub id_or_mac: [u8; 20],
21876    #[doc = "Indicates the type of authentication."]
21877    pub authentication_type: MavOdidAuthType,
21878    #[doc = "Allowed range is 0 - 15."]
21879    pub data_page: u8,
21880    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21881    pub last_page_index: u8,
21882    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21883    pub length: u8,
21884    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21885    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21886    pub authentication_data: [u8; 23],
21887}
21888impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21889    pub const ENCODED_LEN: usize = 53usize;
21890    pub const DEFAULT: Self = Self {
21891        timestamp: 0_u32,
21892        target_system: 0_u8,
21893        target_component: 0_u8,
21894        id_or_mac: [0_u8; 20usize],
21895        authentication_type: MavOdidAuthType::DEFAULT,
21896        data_page: 0_u8,
21897        last_page_index: 0_u8,
21898        length: 0_u8,
21899        authentication_data: [0_u8; 23usize],
21900    };
21901    #[cfg(feature = "arbitrary")]
21902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21903        use arbitrary::{Arbitrary, Unstructured};
21904        let mut buf = [0u8; 1024];
21905        rng.fill_bytes(&mut buf);
21906        let mut unstructured = Unstructured::new(&buf);
21907        Self::arbitrary(&mut unstructured).unwrap_or_default()
21908    }
21909}
21910impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21911    fn default() -> Self {
21912        Self::DEFAULT.clone()
21913    }
21914}
21915impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21916    type Message = MavMessage;
21917    const ID: u32 = 12902u32;
21918    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21919    const EXTRA_CRC: u8 = 140u8;
21920    const ENCODED_LEN: usize = 53usize;
21921    fn deser(
21922        _version: MavlinkVersion,
21923        __input: &[u8],
21924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21925        let avail_len = __input.len();
21926        let mut payload_buf = [0; Self::ENCODED_LEN];
21927        let mut buf = if avail_len < Self::ENCODED_LEN {
21928            payload_buf[0..avail_len].copy_from_slice(__input);
21929            Bytes::new(&payload_buf)
21930        } else {
21931            Bytes::new(__input)
21932        };
21933        let mut __struct = Self::default();
21934        __struct.timestamp = buf.get_u32_le();
21935        __struct.target_system = buf.get_u8();
21936        __struct.target_component = buf.get_u8();
21937        for v in &mut __struct.id_or_mac {
21938            let val = buf.get_u8();
21939            *v = val;
21940        }
21941        let tmp = buf.get_u8();
21942        __struct.authentication_type =
21943            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21944                enum_type: "MavOdidAuthType",
21945                value: tmp as u32,
21946            })?;
21947        __struct.data_page = buf.get_u8();
21948        __struct.last_page_index = buf.get_u8();
21949        __struct.length = buf.get_u8();
21950        for v in &mut __struct.authentication_data {
21951            let val = buf.get_u8();
21952            *v = val;
21953        }
21954        Ok(__struct)
21955    }
21956    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21957        let mut __tmp = BytesMut::new(bytes);
21958        #[allow(clippy::absurd_extreme_comparisons)]
21959        #[allow(unused_comparisons)]
21960        if __tmp.remaining() < Self::ENCODED_LEN {
21961            panic!(
21962                "buffer is too small (need {} bytes, but got {})",
21963                Self::ENCODED_LEN,
21964                __tmp.remaining(),
21965            )
21966        }
21967        __tmp.put_u32_le(self.timestamp);
21968        __tmp.put_u8(self.target_system);
21969        __tmp.put_u8(self.target_component);
21970        for val in &self.id_or_mac {
21971            __tmp.put_u8(*val);
21972        }
21973        __tmp.put_u8(self.authentication_type as u8);
21974        __tmp.put_u8(self.data_page);
21975        __tmp.put_u8(self.last_page_index);
21976        __tmp.put_u8(self.length);
21977        for val in &self.authentication_data {
21978            __tmp.put_u8(*val);
21979        }
21980        if matches!(version, MavlinkVersion::V2) {
21981            let len = __tmp.len();
21982            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21983        } else {
21984            __tmp.len()
21985        }
21986    }
21987}
21988#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21989#[doc = ""]
21990#[doc = "ID: 12900"]
21991#[derive(Debug, Clone, PartialEq)]
21992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21994pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21995    #[doc = "System ID (0 for broadcast)."]
21996    pub target_system: u8,
21997    #[doc = "Component ID (0 for broadcast)."]
21998    pub target_component: u8,
21999    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22000    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22001    pub id_or_mac: [u8; 20],
22002    #[doc = "Indicates the format for the uas_id field of this message."]
22003    pub id_type: MavOdidIdType,
22004    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
22005    pub ua_type: MavOdidUaType,
22006    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
22007    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22008    pub uas_id: [u8; 20],
22009}
22010impl OPEN_DRONE_ID_BASIC_ID_DATA {
22011    pub const ENCODED_LEN: usize = 44usize;
22012    pub const DEFAULT: Self = Self {
22013        target_system: 0_u8,
22014        target_component: 0_u8,
22015        id_or_mac: [0_u8; 20usize],
22016        id_type: MavOdidIdType::DEFAULT,
22017        ua_type: MavOdidUaType::DEFAULT,
22018        uas_id: [0_u8; 20usize],
22019    };
22020    #[cfg(feature = "arbitrary")]
22021    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22022        use arbitrary::{Arbitrary, Unstructured};
22023        let mut buf = [0u8; 1024];
22024        rng.fill_bytes(&mut buf);
22025        let mut unstructured = Unstructured::new(&buf);
22026        Self::arbitrary(&mut unstructured).unwrap_or_default()
22027    }
22028}
22029impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
22030    fn default() -> Self {
22031        Self::DEFAULT.clone()
22032    }
22033}
22034impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
22035    type Message = MavMessage;
22036    const ID: u32 = 12900u32;
22037    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
22038    const EXTRA_CRC: u8 = 114u8;
22039    const ENCODED_LEN: usize = 44usize;
22040    fn deser(
22041        _version: MavlinkVersion,
22042        __input: &[u8],
22043    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22044        let avail_len = __input.len();
22045        let mut payload_buf = [0; Self::ENCODED_LEN];
22046        let mut buf = if avail_len < Self::ENCODED_LEN {
22047            payload_buf[0..avail_len].copy_from_slice(__input);
22048            Bytes::new(&payload_buf)
22049        } else {
22050            Bytes::new(__input)
22051        };
22052        let mut __struct = Self::default();
22053        __struct.target_system = buf.get_u8();
22054        __struct.target_component = buf.get_u8();
22055        for v in &mut __struct.id_or_mac {
22056            let val = buf.get_u8();
22057            *v = val;
22058        }
22059        let tmp = buf.get_u8();
22060        __struct.id_type =
22061            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22062                enum_type: "MavOdidIdType",
22063                value: tmp as u32,
22064            })?;
22065        let tmp = buf.get_u8();
22066        __struct.ua_type =
22067            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22068                enum_type: "MavOdidUaType",
22069                value: tmp as u32,
22070            })?;
22071        for v in &mut __struct.uas_id {
22072            let val = buf.get_u8();
22073            *v = val;
22074        }
22075        Ok(__struct)
22076    }
22077    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22078        let mut __tmp = BytesMut::new(bytes);
22079        #[allow(clippy::absurd_extreme_comparisons)]
22080        #[allow(unused_comparisons)]
22081        if __tmp.remaining() < Self::ENCODED_LEN {
22082            panic!(
22083                "buffer is too small (need {} bytes, but got {})",
22084                Self::ENCODED_LEN,
22085                __tmp.remaining(),
22086            )
22087        }
22088        __tmp.put_u8(self.target_system);
22089        __tmp.put_u8(self.target_component);
22090        for val in &self.id_or_mac {
22091            __tmp.put_u8(*val);
22092        }
22093        __tmp.put_u8(self.id_type as u8);
22094        __tmp.put_u8(self.ua_type as u8);
22095        for val in &self.uas_id {
22096            __tmp.put_u8(*val);
22097        }
22098        if matches!(version, MavlinkVersion::V2) {
22099            let len = __tmp.len();
22100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22101        } else {
22102            __tmp.len()
22103        }
22104    }
22105}
22106#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
22107#[doc = ""]
22108#[doc = "ID: 12901"]
22109#[derive(Debug, Clone, PartialEq)]
22110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22112pub struct OPEN_DRONE_ID_LOCATION_DATA {
22113    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22114    pub latitude: i32,
22115    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
22116    pub longitude: i32,
22117    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
22118    pub altitude_barometric: f32,
22119    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
22120    pub altitude_geodetic: f32,
22121    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
22122    pub height: f32,
22123    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
22124    pub timestamp: f32,
22125    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
22126    pub direction: u16,
22127    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
22128    pub speed_horizontal: u16,
22129    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
22130    pub speed_vertical: i16,
22131    #[doc = "System ID (0 for broadcast)."]
22132    pub target_system: u8,
22133    #[doc = "Component ID (0 for broadcast)."]
22134    pub target_component: u8,
22135    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22136    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22137    pub id_or_mac: [u8; 20],
22138    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
22139    pub status: MavOdidStatus,
22140    #[doc = "Indicates the reference point for the height field."]
22141    pub height_reference: MavOdidHeightRef,
22142    #[doc = "The accuracy of the horizontal position."]
22143    pub horizontal_accuracy: MavOdidHorAcc,
22144    #[doc = "The accuracy of the vertical position."]
22145    pub vertical_accuracy: MavOdidVerAcc,
22146    #[doc = "The accuracy of the barometric altitude."]
22147    pub barometer_accuracy: MavOdidVerAcc,
22148    #[doc = "The accuracy of the horizontal and vertical speed."]
22149    pub speed_accuracy: MavOdidSpeedAcc,
22150    #[doc = "The accuracy of the timestamps."]
22151    pub timestamp_accuracy: MavOdidTimeAcc,
22152}
22153impl OPEN_DRONE_ID_LOCATION_DATA {
22154    pub const ENCODED_LEN: usize = 59usize;
22155    pub const DEFAULT: Self = Self {
22156        latitude: 0_i32,
22157        longitude: 0_i32,
22158        altitude_barometric: 0.0_f32,
22159        altitude_geodetic: 0.0_f32,
22160        height: 0.0_f32,
22161        timestamp: 0.0_f32,
22162        direction: 0_u16,
22163        speed_horizontal: 0_u16,
22164        speed_vertical: 0_i16,
22165        target_system: 0_u8,
22166        target_component: 0_u8,
22167        id_or_mac: [0_u8; 20usize],
22168        status: MavOdidStatus::DEFAULT,
22169        height_reference: MavOdidHeightRef::DEFAULT,
22170        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
22171        vertical_accuracy: MavOdidVerAcc::DEFAULT,
22172        barometer_accuracy: MavOdidVerAcc::DEFAULT,
22173        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
22174        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
22175    };
22176    #[cfg(feature = "arbitrary")]
22177    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22178        use arbitrary::{Arbitrary, Unstructured};
22179        let mut buf = [0u8; 1024];
22180        rng.fill_bytes(&mut buf);
22181        let mut unstructured = Unstructured::new(&buf);
22182        Self::arbitrary(&mut unstructured).unwrap_or_default()
22183    }
22184}
22185impl Default for OPEN_DRONE_ID_LOCATION_DATA {
22186    fn default() -> Self {
22187        Self::DEFAULT.clone()
22188    }
22189}
22190impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
22191    type Message = MavMessage;
22192    const ID: u32 = 12901u32;
22193    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
22194    const EXTRA_CRC: u8 = 254u8;
22195    const ENCODED_LEN: usize = 59usize;
22196    fn deser(
22197        _version: MavlinkVersion,
22198        __input: &[u8],
22199    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22200        let avail_len = __input.len();
22201        let mut payload_buf = [0; Self::ENCODED_LEN];
22202        let mut buf = if avail_len < Self::ENCODED_LEN {
22203            payload_buf[0..avail_len].copy_from_slice(__input);
22204            Bytes::new(&payload_buf)
22205        } else {
22206            Bytes::new(__input)
22207        };
22208        let mut __struct = Self::default();
22209        __struct.latitude = buf.get_i32_le();
22210        __struct.longitude = buf.get_i32_le();
22211        __struct.altitude_barometric = buf.get_f32_le();
22212        __struct.altitude_geodetic = buf.get_f32_le();
22213        __struct.height = buf.get_f32_le();
22214        __struct.timestamp = buf.get_f32_le();
22215        __struct.direction = buf.get_u16_le();
22216        __struct.speed_horizontal = buf.get_u16_le();
22217        __struct.speed_vertical = buf.get_i16_le();
22218        __struct.target_system = buf.get_u8();
22219        __struct.target_component = buf.get_u8();
22220        for v in &mut __struct.id_or_mac {
22221            let val = buf.get_u8();
22222            *v = val;
22223        }
22224        let tmp = buf.get_u8();
22225        __struct.status =
22226            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22227                enum_type: "MavOdidStatus",
22228                value: tmp as u32,
22229            })?;
22230        let tmp = buf.get_u8();
22231        __struct.height_reference =
22232            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22233                enum_type: "MavOdidHeightRef",
22234                value: tmp as u32,
22235            })?;
22236        let tmp = buf.get_u8();
22237        __struct.horizontal_accuracy =
22238            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22239                enum_type: "MavOdidHorAcc",
22240                value: tmp as u32,
22241            })?;
22242        let tmp = buf.get_u8();
22243        __struct.vertical_accuracy =
22244            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22245                enum_type: "MavOdidVerAcc",
22246                value: tmp as u32,
22247            })?;
22248        let tmp = buf.get_u8();
22249        __struct.barometer_accuracy =
22250            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22251                enum_type: "MavOdidVerAcc",
22252                value: tmp as u32,
22253            })?;
22254        let tmp = buf.get_u8();
22255        __struct.speed_accuracy =
22256            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22257                enum_type: "MavOdidSpeedAcc",
22258                value: tmp as u32,
22259            })?;
22260        let tmp = buf.get_u8();
22261        __struct.timestamp_accuracy =
22262            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22263                enum_type: "MavOdidTimeAcc",
22264                value: tmp as u32,
22265            })?;
22266        Ok(__struct)
22267    }
22268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22269        let mut __tmp = BytesMut::new(bytes);
22270        #[allow(clippy::absurd_extreme_comparisons)]
22271        #[allow(unused_comparisons)]
22272        if __tmp.remaining() < Self::ENCODED_LEN {
22273            panic!(
22274                "buffer is too small (need {} bytes, but got {})",
22275                Self::ENCODED_LEN,
22276                __tmp.remaining(),
22277            )
22278        }
22279        __tmp.put_i32_le(self.latitude);
22280        __tmp.put_i32_le(self.longitude);
22281        __tmp.put_f32_le(self.altitude_barometric);
22282        __tmp.put_f32_le(self.altitude_geodetic);
22283        __tmp.put_f32_le(self.height);
22284        __tmp.put_f32_le(self.timestamp);
22285        __tmp.put_u16_le(self.direction);
22286        __tmp.put_u16_le(self.speed_horizontal);
22287        __tmp.put_i16_le(self.speed_vertical);
22288        __tmp.put_u8(self.target_system);
22289        __tmp.put_u8(self.target_component);
22290        for val in &self.id_or_mac {
22291            __tmp.put_u8(*val);
22292        }
22293        __tmp.put_u8(self.status as u8);
22294        __tmp.put_u8(self.height_reference as u8);
22295        __tmp.put_u8(self.horizontal_accuracy as u8);
22296        __tmp.put_u8(self.vertical_accuracy as u8);
22297        __tmp.put_u8(self.barometer_accuracy as u8);
22298        __tmp.put_u8(self.speed_accuracy as u8);
22299        __tmp.put_u8(self.timestamp_accuracy as u8);
22300        if matches!(version, MavlinkVersion::V2) {
22301            let len = __tmp.len();
22302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22303        } else {
22304            __tmp.len()
22305        }
22306    }
22307}
22308#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
22309#[doc = ""]
22310#[doc = "ID: 12915"]
22311#[derive(Debug, Clone, PartialEq)]
22312#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22314pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22315    #[doc = "System ID (0 for broadcast)."]
22316    pub target_system: u8,
22317    #[doc = "Component ID (0 for broadcast)."]
22318    pub target_component: u8,
22319    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22320    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22321    pub id_or_mac: [u8; 20],
22322    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
22323    pub single_message_size: u8,
22324    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
22325    pub msg_pack_size: u8,
22326    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
22327    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22328    pub messages: [u8; 225],
22329}
22330impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22331    pub const ENCODED_LEN: usize = 249usize;
22332    pub const DEFAULT: Self = Self {
22333        target_system: 0_u8,
22334        target_component: 0_u8,
22335        id_or_mac: [0_u8; 20usize],
22336        single_message_size: 0_u8,
22337        msg_pack_size: 0_u8,
22338        messages: [0_u8; 225usize],
22339    };
22340    #[cfg(feature = "arbitrary")]
22341    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22342        use arbitrary::{Arbitrary, Unstructured};
22343        let mut buf = [0u8; 1024];
22344        rng.fill_bytes(&mut buf);
22345        let mut unstructured = Unstructured::new(&buf);
22346        Self::arbitrary(&mut unstructured).unwrap_or_default()
22347    }
22348}
22349impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22350    fn default() -> Self {
22351        Self::DEFAULT.clone()
22352    }
22353}
22354impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
22355    type Message = MavMessage;
22356    const ID: u32 = 12915u32;
22357    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
22358    const EXTRA_CRC: u8 = 94u8;
22359    const ENCODED_LEN: usize = 249usize;
22360    fn deser(
22361        _version: MavlinkVersion,
22362        __input: &[u8],
22363    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22364        let avail_len = __input.len();
22365        let mut payload_buf = [0; Self::ENCODED_LEN];
22366        let mut buf = if avail_len < Self::ENCODED_LEN {
22367            payload_buf[0..avail_len].copy_from_slice(__input);
22368            Bytes::new(&payload_buf)
22369        } else {
22370            Bytes::new(__input)
22371        };
22372        let mut __struct = Self::default();
22373        __struct.target_system = buf.get_u8();
22374        __struct.target_component = buf.get_u8();
22375        for v in &mut __struct.id_or_mac {
22376            let val = buf.get_u8();
22377            *v = val;
22378        }
22379        __struct.single_message_size = buf.get_u8();
22380        __struct.msg_pack_size = buf.get_u8();
22381        for v in &mut __struct.messages {
22382            let val = buf.get_u8();
22383            *v = val;
22384        }
22385        Ok(__struct)
22386    }
22387    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22388        let mut __tmp = BytesMut::new(bytes);
22389        #[allow(clippy::absurd_extreme_comparisons)]
22390        #[allow(unused_comparisons)]
22391        if __tmp.remaining() < Self::ENCODED_LEN {
22392            panic!(
22393                "buffer is too small (need {} bytes, but got {})",
22394                Self::ENCODED_LEN,
22395                __tmp.remaining(),
22396            )
22397        }
22398        __tmp.put_u8(self.target_system);
22399        __tmp.put_u8(self.target_component);
22400        for val in &self.id_or_mac {
22401            __tmp.put_u8(*val);
22402        }
22403        __tmp.put_u8(self.single_message_size);
22404        __tmp.put_u8(self.msg_pack_size);
22405        for val in &self.messages {
22406            __tmp.put_u8(*val);
22407        }
22408        if matches!(version, MavlinkVersion::V2) {
22409            let len = __tmp.len();
22410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22411        } else {
22412            __tmp.len()
22413        }
22414    }
22415}
22416#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
22417#[doc = ""]
22418#[doc = "ID: 12905"]
22419#[derive(Debug, Clone, PartialEq)]
22420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22422pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
22423    #[doc = "System ID (0 for broadcast)."]
22424    pub target_system: u8,
22425    #[doc = "Component ID (0 for broadcast)."]
22426    pub target_component: u8,
22427    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22429    pub id_or_mac: [u8; 20],
22430    #[doc = "Indicates the type of the operator_id field."]
22431    pub operator_id_type: MavOdidOperatorIdType,
22432    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22433    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22434    pub operator_id: [u8; 20],
22435}
22436impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
22437    pub const ENCODED_LEN: usize = 43usize;
22438    pub const DEFAULT: Self = Self {
22439        target_system: 0_u8,
22440        target_component: 0_u8,
22441        id_or_mac: [0_u8; 20usize],
22442        operator_id_type: MavOdidOperatorIdType::DEFAULT,
22443        operator_id: [0_u8; 20usize],
22444    };
22445    #[cfg(feature = "arbitrary")]
22446    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22447        use arbitrary::{Arbitrary, Unstructured};
22448        let mut buf = [0u8; 1024];
22449        rng.fill_bytes(&mut buf);
22450        let mut unstructured = Unstructured::new(&buf);
22451        Self::arbitrary(&mut unstructured).unwrap_or_default()
22452    }
22453}
22454impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22455    fn default() -> Self {
22456        Self::DEFAULT.clone()
22457    }
22458}
22459impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
22460    type Message = MavMessage;
22461    const ID: u32 = 12905u32;
22462    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
22463    const EXTRA_CRC: u8 = 49u8;
22464    const ENCODED_LEN: usize = 43usize;
22465    fn deser(
22466        _version: MavlinkVersion,
22467        __input: &[u8],
22468    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22469        let avail_len = __input.len();
22470        let mut payload_buf = [0; Self::ENCODED_LEN];
22471        let mut buf = if avail_len < Self::ENCODED_LEN {
22472            payload_buf[0..avail_len].copy_from_slice(__input);
22473            Bytes::new(&payload_buf)
22474        } else {
22475            Bytes::new(__input)
22476        };
22477        let mut __struct = Self::default();
22478        __struct.target_system = buf.get_u8();
22479        __struct.target_component = buf.get_u8();
22480        for v in &mut __struct.id_or_mac {
22481            let val = buf.get_u8();
22482            *v = val;
22483        }
22484        let tmp = buf.get_u8();
22485        __struct.operator_id_type =
22486            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22487                enum_type: "MavOdidOperatorIdType",
22488                value: tmp as u32,
22489            })?;
22490        for v in &mut __struct.operator_id {
22491            let val = buf.get_u8();
22492            *v = val;
22493        }
22494        Ok(__struct)
22495    }
22496    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22497        let mut __tmp = BytesMut::new(bytes);
22498        #[allow(clippy::absurd_extreme_comparisons)]
22499        #[allow(unused_comparisons)]
22500        if __tmp.remaining() < Self::ENCODED_LEN {
22501            panic!(
22502                "buffer is too small (need {} bytes, but got {})",
22503                Self::ENCODED_LEN,
22504                __tmp.remaining(),
22505            )
22506        }
22507        __tmp.put_u8(self.target_system);
22508        __tmp.put_u8(self.target_component);
22509        for val in &self.id_or_mac {
22510            __tmp.put_u8(*val);
22511        }
22512        __tmp.put_u8(self.operator_id_type as u8);
22513        for val in &self.operator_id {
22514            __tmp.put_u8(*val);
22515        }
22516        if matches!(version, MavlinkVersion::V2) {
22517            let len = __tmp.len();
22518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22519        } else {
22520            __tmp.len()
22521        }
22522    }
22523}
22524#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
22525#[doc = ""]
22526#[doc = "ID: 12903"]
22527#[derive(Debug, Clone, PartialEq)]
22528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22530pub struct OPEN_DRONE_ID_SELF_ID_DATA {
22531    #[doc = "System ID (0 for broadcast)."]
22532    pub target_system: u8,
22533    #[doc = "Component ID (0 for broadcast)."]
22534    pub target_component: u8,
22535    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22536    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22537    pub id_or_mac: [u8; 20],
22538    #[doc = "Indicates the type of the description field."]
22539    pub description_type: MavOdidDescType,
22540    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
22541    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22542    pub description: [u8; 23],
22543}
22544impl OPEN_DRONE_ID_SELF_ID_DATA {
22545    pub const ENCODED_LEN: usize = 46usize;
22546    pub const DEFAULT: Self = Self {
22547        target_system: 0_u8,
22548        target_component: 0_u8,
22549        id_or_mac: [0_u8; 20usize],
22550        description_type: MavOdidDescType::DEFAULT,
22551        description: [0_u8; 23usize],
22552    };
22553    #[cfg(feature = "arbitrary")]
22554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22555        use arbitrary::{Arbitrary, Unstructured};
22556        let mut buf = [0u8; 1024];
22557        rng.fill_bytes(&mut buf);
22558        let mut unstructured = Unstructured::new(&buf);
22559        Self::arbitrary(&mut unstructured).unwrap_or_default()
22560    }
22561}
22562impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
22563    fn default() -> Self {
22564        Self::DEFAULT.clone()
22565    }
22566}
22567impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
22568    type Message = MavMessage;
22569    const ID: u32 = 12903u32;
22570    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
22571    const EXTRA_CRC: u8 = 249u8;
22572    const ENCODED_LEN: usize = 46usize;
22573    fn deser(
22574        _version: MavlinkVersion,
22575        __input: &[u8],
22576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22577        let avail_len = __input.len();
22578        let mut payload_buf = [0; Self::ENCODED_LEN];
22579        let mut buf = if avail_len < Self::ENCODED_LEN {
22580            payload_buf[0..avail_len].copy_from_slice(__input);
22581            Bytes::new(&payload_buf)
22582        } else {
22583            Bytes::new(__input)
22584        };
22585        let mut __struct = Self::default();
22586        __struct.target_system = buf.get_u8();
22587        __struct.target_component = buf.get_u8();
22588        for v in &mut __struct.id_or_mac {
22589            let val = buf.get_u8();
22590            *v = val;
22591        }
22592        let tmp = buf.get_u8();
22593        __struct.description_type =
22594            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22595                enum_type: "MavOdidDescType",
22596                value: tmp as u32,
22597            })?;
22598        for v in &mut __struct.description {
22599            let val = buf.get_u8();
22600            *v = val;
22601        }
22602        Ok(__struct)
22603    }
22604    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22605        let mut __tmp = BytesMut::new(bytes);
22606        #[allow(clippy::absurd_extreme_comparisons)]
22607        #[allow(unused_comparisons)]
22608        if __tmp.remaining() < Self::ENCODED_LEN {
22609            panic!(
22610                "buffer is too small (need {} bytes, but got {})",
22611                Self::ENCODED_LEN,
22612                __tmp.remaining(),
22613            )
22614        }
22615        __tmp.put_u8(self.target_system);
22616        __tmp.put_u8(self.target_component);
22617        for val in &self.id_or_mac {
22618            __tmp.put_u8(*val);
22619        }
22620        __tmp.put_u8(self.description_type as u8);
22621        for val in &self.description {
22622            __tmp.put_u8(*val);
22623        }
22624        if matches!(version, MavlinkVersion::V2) {
22625            let len = __tmp.len();
22626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22627        } else {
22628            __tmp.len()
22629        }
22630    }
22631}
22632#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
22633#[doc = ""]
22634#[doc = "ID: 12904"]
22635#[derive(Debug, Clone, PartialEq)]
22636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22638pub struct OPEN_DRONE_ID_SYSTEM_DATA {
22639    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22640    pub operator_latitude: i32,
22641    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22642    pub operator_longitude: i32,
22643    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22644    pub area_ceiling: f32,
22645    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
22646    pub area_floor: f32,
22647    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22648    pub operator_altitude_geo: f32,
22649    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22650    pub timestamp: u32,
22651    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
22652    pub area_count: u16,
22653    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
22654    pub area_radius: u16,
22655    #[doc = "System ID (0 for broadcast)."]
22656    pub target_system: u8,
22657    #[doc = "Component ID (0 for broadcast)."]
22658    pub target_component: u8,
22659    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
22660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22661    pub id_or_mac: [u8; 20],
22662    #[doc = "Specifies the operator location type."]
22663    pub operator_location_type: MavOdidOperatorLocationType,
22664    #[doc = "Specifies the classification type of the UA."]
22665    pub classification_type: MavOdidClassificationType,
22666    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
22667    pub category_eu: MavOdidCategoryEu,
22668    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
22669    pub class_eu: MavOdidClassEu,
22670}
22671impl OPEN_DRONE_ID_SYSTEM_DATA {
22672    pub const ENCODED_LEN: usize = 54usize;
22673    pub const DEFAULT: Self = Self {
22674        operator_latitude: 0_i32,
22675        operator_longitude: 0_i32,
22676        area_ceiling: 0.0_f32,
22677        area_floor: 0.0_f32,
22678        operator_altitude_geo: 0.0_f32,
22679        timestamp: 0_u32,
22680        area_count: 0_u16,
22681        area_radius: 0_u16,
22682        target_system: 0_u8,
22683        target_component: 0_u8,
22684        id_or_mac: [0_u8; 20usize],
22685        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
22686        classification_type: MavOdidClassificationType::DEFAULT,
22687        category_eu: MavOdidCategoryEu::DEFAULT,
22688        class_eu: MavOdidClassEu::DEFAULT,
22689    };
22690    #[cfg(feature = "arbitrary")]
22691    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22692        use arbitrary::{Arbitrary, Unstructured};
22693        let mut buf = [0u8; 1024];
22694        rng.fill_bytes(&mut buf);
22695        let mut unstructured = Unstructured::new(&buf);
22696        Self::arbitrary(&mut unstructured).unwrap_or_default()
22697    }
22698}
22699impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
22700    fn default() -> Self {
22701        Self::DEFAULT.clone()
22702    }
22703}
22704impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
22705    type Message = MavMessage;
22706    const ID: u32 = 12904u32;
22707    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22708    const EXTRA_CRC: u8 = 77u8;
22709    const ENCODED_LEN: usize = 54usize;
22710    fn deser(
22711        _version: MavlinkVersion,
22712        __input: &[u8],
22713    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22714        let avail_len = __input.len();
22715        let mut payload_buf = [0; Self::ENCODED_LEN];
22716        let mut buf = if avail_len < Self::ENCODED_LEN {
22717            payload_buf[0..avail_len].copy_from_slice(__input);
22718            Bytes::new(&payload_buf)
22719        } else {
22720            Bytes::new(__input)
22721        };
22722        let mut __struct = Self::default();
22723        __struct.operator_latitude = buf.get_i32_le();
22724        __struct.operator_longitude = buf.get_i32_le();
22725        __struct.area_ceiling = buf.get_f32_le();
22726        __struct.area_floor = buf.get_f32_le();
22727        __struct.operator_altitude_geo = buf.get_f32_le();
22728        __struct.timestamp = buf.get_u32_le();
22729        __struct.area_count = buf.get_u16_le();
22730        __struct.area_radius = buf.get_u16_le();
22731        __struct.target_system = buf.get_u8();
22732        __struct.target_component = buf.get_u8();
22733        for v in &mut __struct.id_or_mac {
22734            let val = buf.get_u8();
22735            *v = val;
22736        }
22737        let tmp = buf.get_u8();
22738        __struct.operator_location_type =
22739            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22740                enum_type: "MavOdidOperatorLocationType",
22741                value: tmp as u32,
22742            })?;
22743        let tmp = buf.get_u8();
22744        __struct.classification_type =
22745            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22746                enum_type: "MavOdidClassificationType",
22747                value: tmp as u32,
22748            })?;
22749        let tmp = buf.get_u8();
22750        __struct.category_eu =
22751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22752                enum_type: "MavOdidCategoryEu",
22753                value: tmp as u32,
22754            })?;
22755        let tmp = buf.get_u8();
22756        __struct.class_eu =
22757            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22758                enum_type: "MavOdidClassEu",
22759                value: tmp as u32,
22760            })?;
22761        Ok(__struct)
22762    }
22763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22764        let mut __tmp = BytesMut::new(bytes);
22765        #[allow(clippy::absurd_extreme_comparisons)]
22766        #[allow(unused_comparisons)]
22767        if __tmp.remaining() < Self::ENCODED_LEN {
22768            panic!(
22769                "buffer is too small (need {} bytes, but got {})",
22770                Self::ENCODED_LEN,
22771                __tmp.remaining(),
22772            )
22773        }
22774        __tmp.put_i32_le(self.operator_latitude);
22775        __tmp.put_i32_le(self.operator_longitude);
22776        __tmp.put_f32_le(self.area_ceiling);
22777        __tmp.put_f32_le(self.area_floor);
22778        __tmp.put_f32_le(self.operator_altitude_geo);
22779        __tmp.put_u32_le(self.timestamp);
22780        __tmp.put_u16_le(self.area_count);
22781        __tmp.put_u16_le(self.area_radius);
22782        __tmp.put_u8(self.target_system);
22783        __tmp.put_u8(self.target_component);
22784        for val in &self.id_or_mac {
22785            __tmp.put_u8(*val);
22786        }
22787        __tmp.put_u8(self.operator_location_type as u8);
22788        __tmp.put_u8(self.classification_type as u8);
22789        __tmp.put_u8(self.category_eu as u8);
22790        __tmp.put_u8(self.class_eu as u8);
22791        if matches!(version, MavlinkVersion::V2) {
22792            let len = __tmp.len();
22793            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22794        } else {
22795            __tmp.len()
22796        }
22797    }
22798}
22799#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22800#[doc = ""]
22801#[doc = "ID: 12919"]
22802#[derive(Debug, Clone, PartialEq)]
22803#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22804#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22805pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22806    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22807    pub operator_latitude: i32,
22808    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22809    pub operator_longitude: i32,
22810    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22811    pub operator_altitude_geo: f32,
22812    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22813    pub timestamp: u32,
22814    #[doc = "System ID (0 for broadcast)."]
22815    pub target_system: u8,
22816    #[doc = "Component ID (0 for broadcast)."]
22817    pub target_component: u8,
22818}
22819impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22820    pub const ENCODED_LEN: usize = 18usize;
22821    pub const DEFAULT: Self = Self {
22822        operator_latitude: 0_i32,
22823        operator_longitude: 0_i32,
22824        operator_altitude_geo: 0.0_f32,
22825        timestamp: 0_u32,
22826        target_system: 0_u8,
22827        target_component: 0_u8,
22828    };
22829    #[cfg(feature = "arbitrary")]
22830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22831        use arbitrary::{Arbitrary, Unstructured};
22832        let mut buf = [0u8; 1024];
22833        rng.fill_bytes(&mut buf);
22834        let mut unstructured = Unstructured::new(&buf);
22835        Self::arbitrary(&mut unstructured).unwrap_or_default()
22836    }
22837}
22838impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22839    fn default() -> Self {
22840        Self::DEFAULT.clone()
22841    }
22842}
22843impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22844    type Message = MavMessage;
22845    const ID: u32 = 12919u32;
22846    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22847    const EXTRA_CRC: u8 = 7u8;
22848    const ENCODED_LEN: usize = 18usize;
22849    fn deser(
22850        _version: MavlinkVersion,
22851        __input: &[u8],
22852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22853        let avail_len = __input.len();
22854        let mut payload_buf = [0; Self::ENCODED_LEN];
22855        let mut buf = if avail_len < Self::ENCODED_LEN {
22856            payload_buf[0..avail_len].copy_from_slice(__input);
22857            Bytes::new(&payload_buf)
22858        } else {
22859            Bytes::new(__input)
22860        };
22861        let mut __struct = Self::default();
22862        __struct.operator_latitude = buf.get_i32_le();
22863        __struct.operator_longitude = buf.get_i32_le();
22864        __struct.operator_altitude_geo = buf.get_f32_le();
22865        __struct.timestamp = buf.get_u32_le();
22866        __struct.target_system = buf.get_u8();
22867        __struct.target_component = buf.get_u8();
22868        Ok(__struct)
22869    }
22870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22871        let mut __tmp = BytesMut::new(bytes);
22872        #[allow(clippy::absurd_extreme_comparisons)]
22873        #[allow(unused_comparisons)]
22874        if __tmp.remaining() < Self::ENCODED_LEN {
22875            panic!(
22876                "buffer is too small (need {} bytes, but got {})",
22877                Self::ENCODED_LEN,
22878                __tmp.remaining(),
22879            )
22880        }
22881        __tmp.put_i32_le(self.operator_latitude);
22882        __tmp.put_i32_le(self.operator_longitude);
22883        __tmp.put_f32_le(self.operator_altitude_geo);
22884        __tmp.put_u32_le(self.timestamp);
22885        __tmp.put_u8(self.target_system);
22886        __tmp.put_u8(self.target_component);
22887        if matches!(version, MavlinkVersion::V2) {
22888            let len = __tmp.len();
22889            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22890        } else {
22891            __tmp.len()
22892        }
22893    }
22894}
22895#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22896#[doc = ""]
22897#[doc = "ID: 100"]
22898#[derive(Debug, Clone, PartialEq)]
22899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22901pub struct OPTICAL_FLOW_DATA {
22902    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22903    pub time_usec: u64,
22904    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22905    pub flow_comp_m_x: f32,
22906    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22907    pub flow_comp_m_y: f32,
22908    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22909    pub ground_distance: f32,
22910    #[doc = "Flow in x-sensor direction"]
22911    pub flow_x: i16,
22912    #[doc = "Flow in y-sensor direction"]
22913    pub flow_y: i16,
22914    #[doc = "Sensor ID"]
22915    pub sensor_id: u8,
22916    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22917    pub quality: u8,
22918    #[doc = "Flow rate about X axis"]
22919    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22920    pub flow_rate_x: f32,
22921    #[doc = "Flow rate about Y axis"]
22922    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22923    pub flow_rate_y: f32,
22924}
22925impl OPTICAL_FLOW_DATA {
22926    pub const ENCODED_LEN: usize = 34usize;
22927    pub const DEFAULT: Self = Self {
22928        time_usec: 0_u64,
22929        flow_comp_m_x: 0.0_f32,
22930        flow_comp_m_y: 0.0_f32,
22931        ground_distance: 0.0_f32,
22932        flow_x: 0_i16,
22933        flow_y: 0_i16,
22934        sensor_id: 0_u8,
22935        quality: 0_u8,
22936        flow_rate_x: 0.0_f32,
22937        flow_rate_y: 0.0_f32,
22938    };
22939    #[cfg(feature = "arbitrary")]
22940    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22941        use arbitrary::{Arbitrary, Unstructured};
22942        let mut buf = [0u8; 1024];
22943        rng.fill_bytes(&mut buf);
22944        let mut unstructured = Unstructured::new(&buf);
22945        Self::arbitrary(&mut unstructured).unwrap_or_default()
22946    }
22947}
22948impl Default for OPTICAL_FLOW_DATA {
22949    fn default() -> Self {
22950        Self::DEFAULT.clone()
22951    }
22952}
22953impl MessageData for OPTICAL_FLOW_DATA {
22954    type Message = MavMessage;
22955    const ID: u32 = 100u32;
22956    const NAME: &'static str = "OPTICAL_FLOW";
22957    const EXTRA_CRC: u8 = 175u8;
22958    const ENCODED_LEN: usize = 34usize;
22959    fn deser(
22960        _version: MavlinkVersion,
22961        __input: &[u8],
22962    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22963        let avail_len = __input.len();
22964        let mut payload_buf = [0; Self::ENCODED_LEN];
22965        let mut buf = if avail_len < Self::ENCODED_LEN {
22966            payload_buf[0..avail_len].copy_from_slice(__input);
22967            Bytes::new(&payload_buf)
22968        } else {
22969            Bytes::new(__input)
22970        };
22971        let mut __struct = Self::default();
22972        __struct.time_usec = buf.get_u64_le();
22973        __struct.flow_comp_m_x = buf.get_f32_le();
22974        __struct.flow_comp_m_y = buf.get_f32_le();
22975        __struct.ground_distance = buf.get_f32_le();
22976        __struct.flow_x = buf.get_i16_le();
22977        __struct.flow_y = buf.get_i16_le();
22978        __struct.sensor_id = buf.get_u8();
22979        __struct.quality = buf.get_u8();
22980        __struct.flow_rate_x = buf.get_f32_le();
22981        __struct.flow_rate_y = buf.get_f32_le();
22982        Ok(__struct)
22983    }
22984    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22985        let mut __tmp = BytesMut::new(bytes);
22986        #[allow(clippy::absurd_extreme_comparisons)]
22987        #[allow(unused_comparisons)]
22988        if __tmp.remaining() < Self::ENCODED_LEN {
22989            panic!(
22990                "buffer is too small (need {} bytes, but got {})",
22991                Self::ENCODED_LEN,
22992                __tmp.remaining(),
22993            )
22994        }
22995        __tmp.put_u64_le(self.time_usec);
22996        __tmp.put_f32_le(self.flow_comp_m_x);
22997        __tmp.put_f32_le(self.flow_comp_m_y);
22998        __tmp.put_f32_le(self.ground_distance);
22999        __tmp.put_i16_le(self.flow_x);
23000        __tmp.put_i16_le(self.flow_y);
23001        __tmp.put_u8(self.sensor_id);
23002        __tmp.put_u8(self.quality);
23003        __tmp.put_f32_le(self.flow_rate_x);
23004        __tmp.put_f32_le(self.flow_rate_y);
23005        if matches!(version, MavlinkVersion::V2) {
23006            let len = __tmp.len();
23007            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23008        } else {
23009            __tmp.len()
23010        }
23011    }
23012}
23013#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
23014#[doc = ""]
23015#[doc = "ID: 106"]
23016#[derive(Debug, Clone, PartialEq)]
23017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23019pub struct OPTICAL_FLOW_RAD_DATA {
23020    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23021    pub time_usec: u64,
23022    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
23023    pub integration_time_us: u32,
23024    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
23025    pub integrated_x: f32,
23026    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
23027    pub integrated_y: f32,
23028    #[doc = "RH rotation around X axis"]
23029    pub integrated_xgyro: f32,
23030    #[doc = "RH rotation around Y axis"]
23031    pub integrated_ygyro: f32,
23032    #[doc = "RH rotation around Z axis"]
23033    pub integrated_zgyro: f32,
23034    #[doc = "Time since the distance was sampled."]
23035    pub time_delta_distance_us: u32,
23036    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
23037    pub distance: f32,
23038    #[doc = "Temperature"]
23039    pub temperature: i16,
23040    #[doc = "Sensor ID"]
23041    pub sensor_id: u8,
23042    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
23043    pub quality: u8,
23044}
23045impl OPTICAL_FLOW_RAD_DATA {
23046    pub const ENCODED_LEN: usize = 44usize;
23047    pub const DEFAULT: Self = Self {
23048        time_usec: 0_u64,
23049        integration_time_us: 0_u32,
23050        integrated_x: 0.0_f32,
23051        integrated_y: 0.0_f32,
23052        integrated_xgyro: 0.0_f32,
23053        integrated_ygyro: 0.0_f32,
23054        integrated_zgyro: 0.0_f32,
23055        time_delta_distance_us: 0_u32,
23056        distance: 0.0_f32,
23057        temperature: 0_i16,
23058        sensor_id: 0_u8,
23059        quality: 0_u8,
23060    };
23061    #[cfg(feature = "arbitrary")]
23062    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23063        use arbitrary::{Arbitrary, Unstructured};
23064        let mut buf = [0u8; 1024];
23065        rng.fill_bytes(&mut buf);
23066        let mut unstructured = Unstructured::new(&buf);
23067        Self::arbitrary(&mut unstructured).unwrap_or_default()
23068    }
23069}
23070impl Default for OPTICAL_FLOW_RAD_DATA {
23071    fn default() -> Self {
23072        Self::DEFAULT.clone()
23073    }
23074}
23075impl MessageData for OPTICAL_FLOW_RAD_DATA {
23076    type Message = MavMessage;
23077    const ID: u32 = 106u32;
23078    const NAME: &'static str = "OPTICAL_FLOW_RAD";
23079    const EXTRA_CRC: u8 = 138u8;
23080    const ENCODED_LEN: usize = 44usize;
23081    fn deser(
23082        _version: MavlinkVersion,
23083        __input: &[u8],
23084    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23085        let avail_len = __input.len();
23086        let mut payload_buf = [0; Self::ENCODED_LEN];
23087        let mut buf = if avail_len < Self::ENCODED_LEN {
23088            payload_buf[0..avail_len].copy_from_slice(__input);
23089            Bytes::new(&payload_buf)
23090        } else {
23091            Bytes::new(__input)
23092        };
23093        let mut __struct = Self::default();
23094        __struct.time_usec = buf.get_u64_le();
23095        __struct.integration_time_us = buf.get_u32_le();
23096        __struct.integrated_x = buf.get_f32_le();
23097        __struct.integrated_y = buf.get_f32_le();
23098        __struct.integrated_xgyro = buf.get_f32_le();
23099        __struct.integrated_ygyro = buf.get_f32_le();
23100        __struct.integrated_zgyro = buf.get_f32_le();
23101        __struct.time_delta_distance_us = buf.get_u32_le();
23102        __struct.distance = buf.get_f32_le();
23103        __struct.temperature = buf.get_i16_le();
23104        __struct.sensor_id = buf.get_u8();
23105        __struct.quality = buf.get_u8();
23106        Ok(__struct)
23107    }
23108    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23109        let mut __tmp = BytesMut::new(bytes);
23110        #[allow(clippy::absurd_extreme_comparisons)]
23111        #[allow(unused_comparisons)]
23112        if __tmp.remaining() < Self::ENCODED_LEN {
23113            panic!(
23114                "buffer is too small (need {} bytes, but got {})",
23115                Self::ENCODED_LEN,
23116                __tmp.remaining(),
23117            )
23118        }
23119        __tmp.put_u64_le(self.time_usec);
23120        __tmp.put_u32_le(self.integration_time_us);
23121        __tmp.put_f32_le(self.integrated_x);
23122        __tmp.put_f32_le(self.integrated_y);
23123        __tmp.put_f32_le(self.integrated_xgyro);
23124        __tmp.put_f32_le(self.integrated_ygyro);
23125        __tmp.put_f32_le(self.integrated_zgyro);
23126        __tmp.put_u32_le(self.time_delta_distance_us);
23127        __tmp.put_f32_le(self.distance);
23128        __tmp.put_i16_le(self.temperature);
23129        __tmp.put_u8(self.sensor_id);
23130        __tmp.put_u8(self.quality);
23131        if matches!(version, MavlinkVersion::V2) {
23132            let len = __tmp.len();
23133            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23134        } else {
23135            __tmp.len()
23136        }
23137    }
23138}
23139#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
23140#[doc = ""]
23141#[doc = "ID: 360"]
23142#[derive(Debug, Clone, PartialEq)]
23143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23145pub struct ORBIT_EXECUTION_STATUS_DATA {
23146    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23147    pub time_usec: u64,
23148    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
23149    pub radius: f32,
23150    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23151    pub x: i32,
23152    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
23153    pub y: i32,
23154    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
23155    pub z: f32,
23156    #[doc = "The coordinate system of the fields: x, y, z."]
23157    pub frame: MavFrame,
23158}
23159impl ORBIT_EXECUTION_STATUS_DATA {
23160    pub const ENCODED_LEN: usize = 25usize;
23161    pub const DEFAULT: Self = Self {
23162        time_usec: 0_u64,
23163        radius: 0.0_f32,
23164        x: 0_i32,
23165        y: 0_i32,
23166        z: 0.0_f32,
23167        frame: MavFrame::DEFAULT,
23168    };
23169    #[cfg(feature = "arbitrary")]
23170    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23171        use arbitrary::{Arbitrary, Unstructured};
23172        let mut buf = [0u8; 1024];
23173        rng.fill_bytes(&mut buf);
23174        let mut unstructured = Unstructured::new(&buf);
23175        Self::arbitrary(&mut unstructured).unwrap_or_default()
23176    }
23177}
23178impl Default for ORBIT_EXECUTION_STATUS_DATA {
23179    fn default() -> Self {
23180        Self::DEFAULT.clone()
23181    }
23182}
23183impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
23184    type Message = MavMessage;
23185    const ID: u32 = 360u32;
23186    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
23187    const EXTRA_CRC: u8 = 11u8;
23188    const ENCODED_LEN: usize = 25usize;
23189    fn deser(
23190        _version: MavlinkVersion,
23191        __input: &[u8],
23192    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23193        let avail_len = __input.len();
23194        let mut payload_buf = [0; Self::ENCODED_LEN];
23195        let mut buf = if avail_len < Self::ENCODED_LEN {
23196            payload_buf[0..avail_len].copy_from_slice(__input);
23197            Bytes::new(&payload_buf)
23198        } else {
23199            Bytes::new(__input)
23200        };
23201        let mut __struct = Self::default();
23202        __struct.time_usec = buf.get_u64_le();
23203        __struct.radius = buf.get_f32_le();
23204        __struct.x = buf.get_i32_le();
23205        __struct.y = buf.get_i32_le();
23206        __struct.z = buf.get_f32_le();
23207        let tmp = buf.get_u8();
23208        __struct.frame =
23209            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23210                enum_type: "MavFrame",
23211                value: tmp as u32,
23212            })?;
23213        Ok(__struct)
23214    }
23215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23216        let mut __tmp = BytesMut::new(bytes);
23217        #[allow(clippy::absurd_extreme_comparisons)]
23218        #[allow(unused_comparisons)]
23219        if __tmp.remaining() < Self::ENCODED_LEN {
23220            panic!(
23221                "buffer is too small (need {} bytes, but got {})",
23222                Self::ENCODED_LEN,
23223                __tmp.remaining(),
23224            )
23225        }
23226        __tmp.put_u64_le(self.time_usec);
23227        __tmp.put_f32_le(self.radius);
23228        __tmp.put_i32_le(self.x);
23229        __tmp.put_i32_le(self.y);
23230        __tmp.put_f32_le(self.z);
23231        __tmp.put_u8(self.frame as u8);
23232        if matches!(version, MavlinkVersion::V2) {
23233            let len = __tmp.len();
23234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23235        } else {
23236            __tmp.len()
23237        }
23238    }
23239}
23240#[doc = "Response from a PARAM_EXT_SET message."]
23241#[doc = ""]
23242#[doc = "ID: 324"]
23243#[derive(Debug, Clone, PartialEq)]
23244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23246pub struct PARAM_EXT_ACK_DATA {
23247    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23248    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23249    pub param_id: [u8; 16],
23250    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
23251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23252    pub param_value: [u8; 128],
23253    #[doc = "Parameter type."]
23254    pub param_type: MavParamExtType,
23255    #[doc = "Result code."]
23256    pub param_result: ParamAck,
23257}
23258impl PARAM_EXT_ACK_DATA {
23259    pub const ENCODED_LEN: usize = 146usize;
23260    pub const DEFAULT: Self = Self {
23261        param_id: [0_u8; 16usize],
23262        param_value: [0_u8; 128usize],
23263        param_type: MavParamExtType::DEFAULT,
23264        param_result: ParamAck::DEFAULT,
23265    };
23266    #[cfg(feature = "arbitrary")]
23267    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23268        use arbitrary::{Arbitrary, Unstructured};
23269        let mut buf = [0u8; 1024];
23270        rng.fill_bytes(&mut buf);
23271        let mut unstructured = Unstructured::new(&buf);
23272        Self::arbitrary(&mut unstructured).unwrap_or_default()
23273    }
23274}
23275impl Default for PARAM_EXT_ACK_DATA {
23276    fn default() -> Self {
23277        Self::DEFAULT.clone()
23278    }
23279}
23280impl MessageData for PARAM_EXT_ACK_DATA {
23281    type Message = MavMessage;
23282    const ID: u32 = 324u32;
23283    const NAME: &'static str = "PARAM_EXT_ACK";
23284    const EXTRA_CRC: u8 = 132u8;
23285    const ENCODED_LEN: usize = 146usize;
23286    fn deser(
23287        _version: MavlinkVersion,
23288        __input: &[u8],
23289    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23290        let avail_len = __input.len();
23291        let mut payload_buf = [0; Self::ENCODED_LEN];
23292        let mut buf = if avail_len < Self::ENCODED_LEN {
23293            payload_buf[0..avail_len].copy_from_slice(__input);
23294            Bytes::new(&payload_buf)
23295        } else {
23296            Bytes::new(__input)
23297        };
23298        let mut __struct = Self::default();
23299        for v in &mut __struct.param_id {
23300            let val = buf.get_u8();
23301            *v = val;
23302        }
23303        for v in &mut __struct.param_value {
23304            let val = buf.get_u8();
23305            *v = val;
23306        }
23307        let tmp = buf.get_u8();
23308        __struct.param_type =
23309            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23310                enum_type: "MavParamExtType",
23311                value: tmp as u32,
23312            })?;
23313        let tmp = buf.get_u8();
23314        __struct.param_result =
23315            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23316                enum_type: "ParamAck",
23317                value: tmp as u32,
23318            })?;
23319        Ok(__struct)
23320    }
23321    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23322        let mut __tmp = BytesMut::new(bytes);
23323        #[allow(clippy::absurd_extreme_comparisons)]
23324        #[allow(unused_comparisons)]
23325        if __tmp.remaining() < Self::ENCODED_LEN {
23326            panic!(
23327                "buffer is too small (need {} bytes, but got {})",
23328                Self::ENCODED_LEN,
23329                __tmp.remaining(),
23330            )
23331        }
23332        for val in &self.param_id {
23333            __tmp.put_u8(*val);
23334        }
23335        for val in &self.param_value {
23336            __tmp.put_u8(*val);
23337        }
23338        __tmp.put_u8(self.param_type as u8);
23339        __tmp.put_u8(self.param_result as u8);
23340        if matches!(version, MavlinkVersion::V2) {
23341            let len = __tmp.len();
23342            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23343        } else {
23344            __tmp.len()
23345        }
23346    }
23347}
23348#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
23349#[doc = ""]
23350#[doc = "ID: 321"]
23351#[derive(Debug, Clone, PartialEq)]
23352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23354pub struct PARAM_EXT_REQUEST_LIST_DATA {
23355    #[doc = "System ID"]
23356    pub target_system: u8,
23357    #[doc = "Component ID"]
23358    pub target_component: u8,
23359}
23360impl PARAM_EXT_REQUEST_LIST_DATA {
23361    pub const ENCODED_LEN: usize = 2usize;
23362    pub const DEFAULT: Self = Self {
23363        target_system: 0_u8,
23364        target_component: 0_u8,
23365    };
23366    #[cfg(feature = "arbitrary")]
23367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23368        use arbitrary::{Arbitrary, Unstructured};
23369        let mut buf = [0u8; 1024];
23370        rng.fill_bytes(&mut buf);
23371        let mut unstructured = Unstructured::new(&buf);
23372        Self::arbitrary(&mut unstructured).unwrap_or_default()
23373    }
23374}
23375impl Default for PARAM_EXT_REQUEST_LIST_DATA {
23376    fn default() -> Self {
23377        Self::DEFAULT.clone()
23378    }
23379}
23380impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
23381    type Message = MavMessage;
23382    const ID: u32 = 321u32;
23383    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
23384    const EXTRA_CRC: u8 = 88u8;
23385    const ENCODED_LEN: usize = 2usize;
23386    fn deser(
23387        _version: MavlinkVersion,
23388        __input: &[u8],
23389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23390        let avail_len = __input.len();
23391        let mut payload_buf = [0; Self::ENCODED_LEN];
23392        let mut buf = if avail_len < Self::ENCODED_LEN {
23393            payload_buf[0..avail_len].copy_from_slice(__input);
23394            Bytes::new(&payload_buf)
23395        } else {
23396            Bytes::new(__input)
23397        };
23398        let mut __struct = Self::default();
23399        __struct.target_system = buf.get_u8();
23400        __struct.target_component = buf.get_u8();
23401        Ok(__struct)
23402    }
23403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23404        let mut __tmp = BytesMut::new(bytes);
23405        #[allow(clippy::absurd_extreme_comparisons)]
23406        #[allow(unused_comparisons)]
23407        if __tmp.remaining() < Self::ENCODED_LEN {
23408            panic!(
23409                "buffer is too small (need {} bytes, but got {})",
23410                Self::ENCODED_LEN,
23411                __tmp.remaining(),
23412            )
23413        }
23414        __tmp.put_u8(self.target_system);
23415        __tmp.put_u8(self.target_component);
23416        if matches!(version, MavlinkVersion::V2) {
23417            let len = __tmp.len();
23418            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23419        } else {
23420            __tmp.len()
23421        }
23422    }
23423}
23424#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
23425#[doc = ""]
23426#[doc = "ID: 320"]
23427#[derive(Debug, Clone, PartialEq)]
23428#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23430pub struct PARAM_EXT_REQUEST_READ_DATA {
23431    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
23432    pub param_index: i16,
23433    #[doc = "System ID"]
23434    pub target_system: u8,
23435    #[doc = "Component ID"]
23436    pub target_component: u8,
23437    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23439    pub param_id: [u8; 16],
23440}
23441impl PARAM_EXT_REQUEST_READ_DATA {
23442    pub const ENCODED_LEN: usize = 20usize;
23443    pub const DEFAULT: Self = Self {
23444        param_index: 0_i16,
23445        target_system: 0_u8,
23446        target_component: 0_u8,
23447        param_id: [0_u8; 16usize],
23448    };
23449    #[cfg(feature = "arbitrary")]
23450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23451        use arbitrary::{Arbitrary, Unstructured};
23452        let mut buf = [0u8; 1024];
23453        rng.fill_bytes(&mut buf);
23454        let mut unstructured = Unstructured::new(&buf);
23455        Self::arbitrary(&mut unstructured).unwrap_or_default()
23456    }
23457}
23458impl Default for PARAM_EXT_REQUEST_READ_DATA {
23459    fn default() -> Self {
23460        Self::DEFAULT.clone()
23461    }
23462}
23463impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
23464    type Message = MavMessage;
23465    const ID: u32 = 320u32;
23466    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
23467    const EXTRA_CRC: u8 = 243u8;
23468    const ENCODED_LEN: usize = 20usize;
23469    fn deser(
23470        _version: MavlinkVersion,
23471        __input: &[u8],
23472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23473        let avail_len = __input.len();
23474        let mut payload_buf = [0; Self::ENCODED_LEN];
23475        let mut buf = if avail_len < Self::ENCODED_LEN {
23476            payload_buf[0..avail_len].copy_from_slice(__input);
23477            Bytes::new(&payload_buf)
23478        } else {
23479            Bytes::new(__input)
23480        };
23481        let mut __struct = Self::default();
23482        __struct.param_index = buf.get_i16_le();
23483        __struct.target_system = buf.get_u8();
23484        __struct.target_component = buf.get_u8();
23485        for v in &mut __struct.param_id {
23486            let val = buf.get_u8();
23487            *v = val;
23488        }
23489        Ok(__struct)
23490    }
23491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23492        let mut __tmp = BytesMut::new(bytes);
23493        #[allow(clippy::absurd_extreme_comparisons)]
23494        #[allow(unused_comparisons)]
23495        if __tmp.remaining() < Self::ENCODED_LEN {
23496            panic!(
23497                "buffer is too small (need {} bytes, but got {})",
23498                Self::ENCODED_LEN,
23499                __tmp.remaining(),
23500            )
23501        }
23502        __tmp.put_i16_le(self.param_index);
23503        __tmp.put_u8(self.target_system);
23504        __tmp.put_u8(self.target_component);
23505        for val in &self.param_id {
23506            __tmp.put_u8(*val);
23507        }
23508        if matches!(version, MavlinkVersion::V2) {
23509            let len = __tmp.len();
23510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23511        } else {
23512            __tmp.len()
23513        }
23514    }
23515}
23516#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
23517#[doc = ""]
23518#[doc = "ID: 323"]
23519#[derive(Debug, Clone, PartialEq)]
23520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23522pub struct PARAM_EXT_SET_DATA {
23523    #[doc = "System ID"]
23524    pub target_system: u8,
23525    #[doc = "Component ID"]
23526    pub target_component: u8,
23527    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23529    pub param_id: [u8; 16],
23530    #[doc = "Parameter value"]
23531    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23532    pub param_value: [u8; 128],
23533    #[doc = "Parameter type."]
23534    pub param_type: MavParamExtType,
23535}
23536impl PARAM_EXT_SET_DATA {
23537    pub const ENCODED_LEN: usize = 147usize;
23538    pub const DEFAULT: Self = Self {
23539        target_system: 0_u8,
23540        target_component: 0_u8,
23541        param_id: [0_u8; 16usize],
23542        param_value: [0_u8; 128usize],
23543        param_type: MavParamExtType::DEFAULT,
23544    };
23545    #[cfg(feature = "arbitrary")]
23546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23547        use arbitrary::{Arbitrary, Unstructured};
23548        let mut buf = [0u8; 1024];
23549        rng.fill_bytes(&mut buf);
23550        let mut unstructured = Unstructured::new(&buf);
23551        Self::arbitrary(&mut unstructured).unwrap_or_default()
23552    }
23553}
23554impl Default for PARAM_EXT_SET_DATA {
23555    fn default() -> Self {
23556        Self::DEFAULT.clone()
23557    }
23558}
23559impl MessageData for PARAM_EXT_SET_DATA {
23560    type Message = MavMessage;
23561    const ID: u32 = 323u32;
23562    const NAME: &'static str = "PARAM_EXT_SET";
23563    const EXTRA_CRC: u8 = 78u8;
23564    const ENCODED_LEN: usize = 147usize;
23565    fn deser(
23566        _version: MavlinkVersion,
23567        __input: &[u8],
23568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23569        let avail_len = __input.len();
23570        let mut payload_buf = [0; Self::ENCODED_LEN];
23571        let mut buf = if avail_len < Self::ENCODED_LEN {
23572            payload_buf[0..avail_len].copy_from_slice(__input);
23573            Bytes::new(&payload_buf)
23574        } else {
23575            Bytes::new(__input)
23576        };
23577        let mut __struct = Self::default();
23578        __struct.target_system = buf.get_u8();
23579        __struct.target_component = buf.get_u8();
23580        for v in &mut __struct.param_id {
23581            let val = buf.get_u8();
23582            *v = val;
23583        }
23584        for v in &mut __struct.param_value {
23585            let val = buf.get_u8();
23586            *v = val;
23587        }
23588        let tmp = buf.get_u8();
23589        __struct.param_type =
23590            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23591                enum_type: "MavParamExtType",
23592                value: tmp as u32,
23593            })?;
23594        Ok(__struct)
23595    }
23596    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23597        let mut __tmp = BytesMut::new(bytes);
23598        #[allow(clippy::absurd_extreme_comparisons)]
23599        #[allow(unused_comparisons)]
23600        if __tmp.remaining() < Self::ENCODED_LEN {
23601            panic!(
23602                "buffer is too small (need {} bytes, but got {})",
23603                Self::ENCODED_LEN,
23604                __tmp.remaining(),
23605            )
23606        }
23607        __tmp.put_u8(self.target_system);
23608        __tmp.put_u8(self.target_component);
23609        for val in &self.param_id {
23610            __tmp.put_u8(*val);
23611        }
23612        for val in &self.param_value {
23613            __tmp.put_u8(*val);
23614        }
23615        __tmp.put_u8(self.param_type as u8);
23616        if matches!(version, MavlinkVersion::V2) {
23617            let len = __tmp.len();
23618            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23619        } else {
23620            __tmp.len()
23621        }
23622    }
23623}
23624#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
23625#[doc = ""]
23626#[doc = "ID: 322"]
23627#[derive(Debug, Clone, PartialEq)]
23628#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23629#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23630pub struct PARAM_EXT_VALUE_DATA {
23631    #[doc = "Total number of parameters"]
23632    pub param_count: u16,
23633    #[doc = "Index of this parameter"]
23634    pub param_index: u16,
23635    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23636    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23637    pub param_id: [u8; 16],
23638    #[doc = "Parameter value"]
23639    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23640    pub param_value: [u8; 128],
23641    #[doc = "Parameter type."]
23642    pub param_type: MavParamExtType,
23643}
23644impl PARAM_EXT_VALUE_DATA {
23645    pub const ENCODED_LEN: usize = 149usize;
23646    pub const DEFAULT: Self = Self {
23647        param_count: 0_u16,
23648        param_index: 0_u16,
23649        param_id: [0_u8; 16usize],
23650        param_value: [0_u8; 128usize],
23651        param_type: MavParamExtType::DEFAULT,
23652    };
23653    #[cfg(feature = "arbitrary")]
23654    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23655        use arbitrary::{Arbitrary, Unstructured};
23656        let mut buf = [0u8; 1024];
23657        rng.fill_bytes(&mut buf);
23658        let mut unstructured = Unstructured::new(&buf);
23659        Self::arbitrary(&mut unstructured).unwrap_or_default()
23660    }
23661}
23662impl Default for PARAM_EXT_VALUE_DATA {
23663    fn default() -> Self {
23664        Self::DEFAULT.clone()
23665    }
23666}
23667impl MessageData for PARAM_EXT_VALUE_DATA {
23668    type Message = MavMessage;
23669    const ID: u32 = 322u32;
23670    const NAME: &'static str = "PARAM_EXT_VALUE";
23671    const EXTRA_CRC: u8 = 243u8;
23672    const ENCODED_LEN: usize = 149usize;
23673    fn deser(
23674        _version: MavlinkVersion,
23675        __input: &[u8],
23676    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23677        let avail_len = __input.len();
23678        let mut payload_buf = [0; Self::ENCODED_LEN];
23679        let mut buf = if avail_len < Self::ENCODED_LEN {
23680            payload_buf[0..avail_len].copy_from_slice(__input);
23681            Bytes::new(&payload_buf)
23682        } else {
23683            Bytes::new(__input)
23684        };
23685        let mut __struct = Self::default();
23686        __struct.param_count = buf.get_u16_le();
23687        __struct.param_index = buf.get_u16_le();
23688        for v in &mut __struct.param_id {
23689            let val = buf.get_u8();
23690            *v = val;
23691        }
23692        for v in &mut __struct.param_value {
23693            let val = buf.get_u8();
23694            *v = val;
23695        }
23696        let tmp = buf.get_u8();
23697        __struct.param_type =
23698            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23699                enum_type: "MavParamExtType",
23700                value: tmp as u32,
23701            })?;
23702        Ok(__struct)
23703    }
23704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23705        let mut __tmp = BytesMut::new(bytes);
23706        #[allow(clippy::absurd_extreme_comparisons)]
23707        #[allow(unused_comparisons)]
23708        if __tmp.remaining() < Self::ENCODED_LEN {
23709            panic!(
23710                "buffer is too small (need {} bytes, but got {})",
23711                Self::ENCODED_LEN,
23712                __tmp.remaining(),
23713            )
23714        }
23715        __tmp.put_u16_le(self.param_count);
23716        __tmp.put_u16_le(self.param_index);
23717        for val in &self.param_id {
23718            __tmp.put_u8(*val);
23719        }
23720        for val in &self.param_value {
23721            __tmp.put_u8(*val);
23722        }
23723        __tmp.put_u8(self.param_type as u8);
23724        if matches!(version, MavlinkVersion::V2) {
23725            let len = __tmp.len();
23726            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23727        } else {
23728            __tmp.len()
23729        }
23730    }
23731}
23732#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23733#[doc = ""]
23734#[doc = "ID: 50"]
23735#[derive(Debug, Clone, PartialEq)]
23736#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23738pub struct PARAM_MAP_RC_DATA {
23739    #[doc = "Initial parameter value"]
23740    pub param_value0: f32,
23741    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23742    pub scale: f32,
23743    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23744    pub param_value_min: f32,
23745    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23746    pub param_value_max: f32,
23747    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23748    pub param_index: i16,
23749    #[doc = "System ID"]
23750    pub target_system: u8,
23751    #[doc = "Component ID"]
23752    pub target_component: u8,
23753    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23754    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23755    pub param_id: [u8; 16],
23756    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23757    pub parameter_rc_channel_index: u8,
23758}
23759impl PARAM_MAP_RC_DATA {
23760    pub const ENCODED_LEN: usize = 37usize;
23761    pub const DEFAULT: Self = Self {
23762        param_value0: 0.0_f32,
23763        scale: 0.0_f32,
23764        param_value_min: 0.0_f32,
23765        param_value_max: 0.0_f32,
23766        param_index: 0_i16,
23767        target_system: 0_u8,
23768        target_component: 0_u8,
23769        param_id: [0_u8; 16usize],
23770        parameter_rc_channel_index: 0_u8,
23771    };
23772    #[cfg(feature = "arbitrary")]
23773    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23774        use arbitrary::{Arbitrary, Unstructured};
23775        let mut buf = [0u8; 1024];
23776        rng.fill_bytes(&mut buf);
23777        let mut unstructured = Unstructured::new(&buf);
23778        Self::arbitrary(&mut unstructured).unwrap_or_default()
23779    }
23780}
23781impl Default for PARAM_MAP_RC_DATA {
23782    fn default() -> Self {
23783        Self::DEFAULT.clone()
23784    }
23785}
23786impl MessageData for PARAM_MAP_RC_DATA {
23787    type Message = MavMessage;
23788    const ID: u32 = 50u32;
23789    const NAME: &'static str = "PARAM_MAP_RC";
23790    const EXTRA_CRC: u8 = 78u8;
23791    const ENCODED_LEN: usize = 37usize;
23792    fn deser(
23793        _version: MavlinkVersion,
23794        __input: &[u8],
23795    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23796        let avail_len = __input.len();
23797        let mut payload_buf = [0; Self::ENCODED_LEN];
23798        let mut buf = if avail_len < Self::ENCODED_LEN {
23799            payload_buf[0..avail_len].copy_from_slice(__input);
23800            Bytes::new(&payload_buf)
23801        } else {
23802            Bytes::new(__input)
23803        };
23804        let mut __struct = Self::default();
23805        __struct.param_value0 = buf.get_f32_le();
23806        __struct.scale = buf.get_f32_le();
23807        __struct.param_value_min = buf.get_f32_le();
23808        __struct.param_value_max = buf.get_f32_le();
23809        __struct.param_index = buf.get_i16_le();
23810        __struct.target_system = buf.get_u8();
23811        __struct.target_component = buf.get_u8();
23812        for v in &mut __struct.param_id {
23813            let val = buf.get_u8();
23814            *v = val;
23815        }
23816        __struct.parameter_rc_channel_index = buf.get_u8();
23817        Ok(__struct)
23818    }
23819    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23820        let mut __tmp = BytesMut::new(bytes);
23821        #[allow(clippy::absurd_extreme_comparisons)]
23822        #[allow(unused_comparisons)]
23823        if __tmp.remaining() < Self::ENCODED_LEN {
23824            panic!(
23825                "buffer is too small (need {} bytes, but got {})",
23826                Self::ENCODED_LEN,
23827                __tmp.remaining(),
23828            )
23829        }
23830        __tmp.put_f32_le(self.param_value0);
23831        __tmp.put_f32_le(self.scale);
23832        __tmp.put_f32_le(self.param_value_min);
23833        __tmp.put_f32_le(self.param_value_max);
23834        __tmp.put_i16_le(self.param_index);
23835        __tmp.put_u8(self.target_system);
23836        __tmp.put_u8(self.target_component);
23837        for val in &self.param_id {
23838            __tmp.put_u8(*val);
23839        }
23840        __tmp.put_u8(self.parameter_rc_channel_index);
23841        if matches!(version, MavlinkVersion::V2) {
23842            let len = __tmp.len();
23843            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23844        } else {
23845            __tmp.len()
23846        }
23847    }
23848}
23849#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23850#[doc = ""]
23851#[doc = "ID: 21"]
23852#[derive(Debug, Clone, PartialEq)]
23853#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23854#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23855pub struct PARAM_REQUEST_LIST_DATA {
23856    #[doc = "System ID"]
23857    pub target_system: u8,
23858    #[doc = "Component ID"]
23859    pub target_component: u8,
23860}
23861impl PARAM_REQUEST_LIST_DATA {
23862    pub const ENCODED_LEN: usize = 2usize;
23863    pub const DEFAULT: Self = Self {
23864        target_system: 0_u8,
23865        target_component: 0_u8,
23866    };
23867    #[cfg(feature = "arbitrary")]
23868    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23869        use arbitrary::{Arbitrary, Unstructured};
23870        let mut buf = [0u8; 1024];
23871        rng.fill_bytes(&mut buf);
23872        let mut unstructured = Unstructured::new(&buf);
23873        Self::arbitrary(&mut unstructured).unwrap_or_default()
23874    }
23875}
23876impl Default for PARAM_REQUEST_LIST_DATA {
23877    fn default() -> Self {
23878        Self::DEFAULT.clone()
23879    }
23880}
23881impl MessageData for PARAM_REQUEST_LIST_DATA {
23882    type Message = MavMessage;
23883    const ID: u32 = 21u32;
23884    const NAME: &'static str = "PARAM_REQUEST_LIST";
23885    const EXTRA_CRC: u8 = 159u8;
23886    const ENCODED_LEN: usize = 2usize;
23887    fn deser(
23888        _version: MavlinkVersion,
23889        __input: &[u8],
23890    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23891        let avail_len = __input.len();
23892        let mut payload_buf = [0; Self::ENCODED_LEN];
23893        let mut buf = if avail_len < Self::ENCODED_LEN {
23894            payload_buf[0..avail_len].copy_from_slice(__input);
23895            Bytes::new(&payload_buf)
23896        } else {
23897            Bytes::new(__input)
23898        };
23899        let mut __struct = Self::default();
23900        __struct.target_system = buf.get_u8();
23901        __struct.target_component = buf.get_u8();
23902        Ok(__struct)
23903    }
23904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23905        let mut __tmp = BytesMut::new(bytes);
23906        #[allow(clippy::absurd_extreme_comparisons)]
23907        #[allow(unused_comparisons)]
23908        if __tmp.remaining() < Self::ENCODED_LEN {
23909            panic!(
23910                "buffer is too small (need {} bytes, but got {})",
23911                Self::ENCODED_LEN,
23912                __tmp.remaining(),
23913            )
23914        }
23915        __tmp.put_u8(self.target_system);
23916        __tmp.put_u8(self.target_component);
23917        if matches!(version, MavlinkVersion::V2) {
23918            let len = __tmp.len();
23919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23920        } else {
23921            __tmp.len()
23922        }
23923    }
23924}
23925#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23926#[doc = ""]
23927#[doc = "ID: 20"]
23928#[derive(Debug, Clone, PartialEq)]
23929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23930#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23931pub struct PARAM_REQUEST_READ_DATA {
23932    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23933    pub param_index: i16,
23934    #[doc = "System ID"]
23935    pub target_system: u8,
23936    #[doc = "Component ID"]
23937    pub target_component: u8,
23938    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23939    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23940    pub param_id: [u8; 16],
23941}
23942impl PARAM_REQUEST_READ_DATA {
23943    pub const ENCODED_LEN: usize = 20usize;
23944    pub const DEFAULT: Self = Self {
23945        param_index: 0_i16,
23946        target_system: 0_u8,
23947        target_component: 0_u8,
23948        param_id: [0_u8; 16usize],
23949    };
23950    #[cfg(feature = "arbitrary")]
23951    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23952        use arbitrary::{Arbitrary, Unstructured};
23953        let mut buf = [0u8; 1024];
23954        rng.fill_bytes(&mut buf);
23955        let mut unstructured = Unstructured::new(&buf);
23956        Self::arbitrary(&mut unstructured).unwrap_or_default()
23957    }
23958}
23959impl Default for PARAM_REQUEST_READ_DATA {
23960    fn default() -> Self {
23961        Self::DEFAULT.clone()
23962    }
23963}
23964impl MessageData for PARAM_REQUEST_READ_DATA {
23965    type Message = MavMessage;
23966    const ID: u32 = 20u32;
23967    const NAME: &'static str = "PARAM_REQUEST_READ";
23968    const EXTRA_CRC: u8 = 214u8;
23969    const ENCODED_LEN: usize = 20usize;
23970    fn deser(
23971        _version: MavlinkVersion,
23972        __input: &[u8],
23973    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23974        let avail_len = __input.len();
23975        let mut payload_buf = [0; Self::ENCODED_LEN];
23976        let mut buf = if avail_len < Self::ENCODED_LEN {
23977            payload_buf[0..avail_len].copy_from_slice(__input);
23978            Bytes::new(&payload_buf)
23979        } else {
23980            Bytes::new(__input)
23981        };
23982        let mut __struct = Self::default();
23983        __struct.param_index = buf.get_i16_le();
23984        __struct.target_system = buf.get_u8();
23985        __struct.target_component = buf.get_u8();
23986        for v in &mut __struct.param_id {
23987            let val = buf.get_u8();
23988            *v = val;
23989        }
23990        Ok(__struct)
23991    }
23992    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23993        let mut __tmp = BytesMut::new(bytes);
23994        #[allow(clippy::absurd_extreme_comparisons)]
23995        #[allow(unused_comparisons)]
23996        if __tmp.remaining() < Self::ENCODED_LEN {
23997            panic!(
23998                "buffer is too small (need {} bytes, but got {})",
23999                Self::ENCODED_LEN,
24000                __tmp.remaining(),
24001            )
24002        }
24003        __tmp.put_i16_le(self.param_index);
24004        __tmp.put_u8(self.target_system);
24005        __tmp.put_u8(self.target_component);
24006        for val in &self.param_id {
24007            __tmp.put_u8(*val);
24008        }
24009        if matches!(version, MavlinkVersion::V2) {
24010            let len = __tmp.len();
24011            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24012        } else {
24013            __tmp.len()
24014        }
24015    }
24016}
24017#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24018#[doc = ""]
24019#[doc = "ID: 23"]
24020#[derive(Debug, Clone, PartialEq)]
24021#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24022#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24023pub struct PARAM_SET_DATA {
24024    #[doc = "Onboard parameter value"]
24025    pub param_value: f32,
24026    #[doc = "System ID"]
24027    pub target_system: u8,
24028    #[doc = "Component ID"]
24029    pub target_component: u8,
24030    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24031    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24032    pub param_id: [u8; 16],
24033    #[doc = "Onboard parameter type."]
24034    pub param_type: MavParamType,
24035}
24036impl PARAM_SET_DATA {
24037    pub const ENCODED_LEN: usize = 23usize;
24038    pub const DEFAULT: Self = Self {
24039        param_value: 0.0_f32,
24040        target_system: 0_u8,
24041        target_component: 0_u8,
24042        param_id: [0_u8; 16usize],
24043        param_type: MavParamType::DEFAULT,
24044    };
24045    #[cfg(feature = "arbitrary")]
24046    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24047        use arbitrary::{Arbitrary, Unstructured};
24048        let mut buf = [0u8; 1024];
24049        rng.fill_bytes(&mut buf);
24050        let mut unstructured = Unstructured::new(&buf);
24051        Self::arbitrary(&mut unstructured).unwrap_or_default()
24052    }
24053}
24054impl Default for PARAM_SET_DATA {
24055    fn default() -> Self {
24056        Self::DEFAULT.clone()
24057    }
24058}
24059impl MessageData for PARAM_SET_DATA {
24060    type Message = MavMessage;
24061    const ID: u32 = 23u32;
24062    const NAME: &'static str = "PARAM_SET";
24063    const EXTRA_CRC: u8 = 168u8;
24064    const ENCODED_LEN: usize = 23usize;
24065    fn deser(
24066        _version: MavlinkVersion,
24067        __input: &[u8],
24068    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24069        let avail_len = __input.len();
24070        let mut payload_buf = [0; Self::ENCODED_LEN];
24071        let mut buf = if avail_len < Self::ENCODED_LEN {
24072            payload_buf[0..avail_len].copy_from_slice(__input);
24073            Bytes::new(&payload_buf)
24074        } else {
24075            Bytes::new(__input)
24076        };
24077        let mut __struct = Self::default();
24078        __struct.param_value = buf.get_f32_le();
24079        __struct.target_system = buf.get_u8();
24080        __struct.target_component = buf.get_u8();
24081        for v in &mut __struct.param_id {
24082            let val = buf.get_u8();
24083            *v = val;
24084        }
24085        let tmp = buf.get_u8();
24086        __struct.param_type =
24087            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24088                enum_type: "MavParamType",
24089                value: tmp as u32,
24090            })?;
24091        Ok(__struct)
24092    }
24093    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24094        let mut __tmp = BytesMut::new(bytes);
24095        #[allow(clippy::absurd_extreme_comparisons)]
24096        #[allow(unused_comparisons)]
24097        if __tmp.remaining() < Self::ENCODED_LEN {
24098            panic!(
24099                "buffer is too small (need {} bytes, but got {})",
24100                Self::ENCODED_LEN,
24101                __tmp.remaining(),
24102            )
24103        }
24104        __tmp.put_f32_le(self.param_value);
24105        __tmp.put_u8(self.target_system);
24106        __tmp.put_u8(self.target_component);
24107        for val in &self.param_id {
24108            __tmp.put_u8(*val);
24109        }
24110        __tmp.put_u8(self.param_type as u8);
24111        if matches!(version, MavlinkVersion::V2) {
24112            let len = __tmp.len();
24113            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24114        } else {
24115            __tmp.len()
24116        }
24117    }
24118}
24119#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
24120#[doc = ""]
24121#[doc = "ID: 22"]
24122#[derive(Debug, Clone, PartialEq)]
24123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24125pub struct PARAM_VALUE_DATA {
24126    #[doc = "Onboard parameter value"]
24127    pub param_value: f32,
24128    #[doc = "Total number of onboard parameters"]
24129    pub param_count: u16,
24130    #[doc = "Index of this onboard parameter"]
24131    pub param_index: u16,
24132    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
24133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24134    pub param_id: [u8; 16],
24135    #[doc = "Onboard parameter type."]
24136    pub param_type: MavParamType,
24137}
24138impl PARAM_VALUE_DATA {
24139    pub const ENCODED_LEN: usize = 25usize;
24140    pub const DEFAULT: Self = Self {
24141        param_value: 0.0_f32,
24142        param_count: 0_u16,
24143        param_index: 0_u16,
24144        param_id: [0_u8; 16usize],
24145        param_type: MavParamType::DEFAULT,
24146    };
24147    #[cfg(feature = "arbitrary")]
24148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24149        use arbitrary::{Arbitrary, Unstructured};
24150        let mut buf = [0u8; 1024];
24151        rng.fill_bytes(&mut buf);
24152        let mut unstructured = Unstructured::new(&buf);
24153        Self::arbitrary(&mut unstructured).unwrap_or_default()
24154    }
24155}
24156impl Default for PARAM_VALUE_DATA {
24157    fn default() -> Self {
24158        Self::DEFAULT.clone()
24159    }
24160}
24161impl MessageData for PARAM_VALUE_DATA {
24162    type Message = MavMessage;
24163    const ID: u32 = 22u32;
24164    const NAME: &'static str = "PARAM_VALUE";
24165    const EXTRA_CRC: u8 = 220u8;
24166    const ENCODED_LEN: usize = 25usize;
24167    fn deser(
24168        _version: MavlinkVersion,
24169        __input: &[u8],
24170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24171        let avail_len = __input.len();
24172        let mut payload_buf = [0; Self::ENCODED_LEN];
24173        let mut buf = if avail_len < Self::ENCODED_LEN {
24174            payload_buf[0..avail_len].copy_from_slice(__input);
24175            Bytes::new(&payload_buf)
24176        } else {
24177            Bytes::new(__input)
24178        };
24179        let mut __struct = Self::default();
24180        __struct.param_value = buf.get_f32_le();
24181        __struct.param_count = buf.get_u16_le();
24182        __struct.param_index = buf.get_u16_le();
24183        for v in &mut __struct.param_id {
24184            let val = buf.get_u8();
24185            *v = val;
24186        }
24187        let tmp = buf.get_u8();
24188        __struct.param_type =
24189            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24190                enum_type: "MavParamType",
24191                value: tmp as u32,
24192            })?;
24193        Ok(__struct)
24194    }
24195    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24196        let mut __tmp = BytesMut::new(bytes);
24197        #[allow(clippy::absurd_extreme_comparisons)]
24198        #[allow(unused_comparisons)]
24199        if __tmp.remaining() < Self::ENCODED_LEN {
24200            panic!(
24201                "buffer is too small (need {} bytes, but got {})",
24202                Self::ENCODED_LEN,
24203                __tmp.remaining(),
24204            )
24205        }
24206        __tmp.put_f32_le(self.param_value);
24207        __tmp.put_u16_le(self.param_count);
24208        __tmp.put_u16_le(self.param_index);
24209        for val in &self.param_id {
24210            __tmp.put_u8(*val);
24211        }
24212        __tmp.put_u8(self.param_type as u8);
24213        if matches!(version, MavlinkVersion::V2) {
24214            let len = __tmp.len();
24215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24216        } else {
24217            __tmp.len()
24218        }
24219    }
24220}
24221#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
24222#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
24223#[doc = ""]
24224#[doc = "ID: 4"]
24225#[derive(Debug, Clone, PartialEq)]
24226#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24227#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24228pub struct PING_DATA {
24229    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24230    pub time_usec: u64,
24231    #[doc = "PING sequence"]
24232    pub seq: u32,
24233    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
24234    pub target_system: u8,
24235    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
24236    pub target_component: u8,
24237}
24238impl PING_DATA {
24239    pub const ENCODED_LEN: usize = 14usize;
24240    pub const DEFAULT: Self = Self {
24241        time_usec: 0_u64,
24242        seq: 0_u32,
24243        target_system: 0_u8,
24244        target_component: 0_u8,
24245    };
24246    #[cfg(feature = "arbitrary")]
24247    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24248        use arbitrary::{Arbitrary, Unstructured};
24249        let mut buf = [0u8; 1024];
24250        rng.fill_bytes(&mut buf);
24251        let mut unstructured = Unstructured::new(&buf);
24252        Self::arbitrary(&mut unstructured).unwrap_or_default()
24253    }
24254}
24255impl Default for PING_DATA {
24256    fn default() -> Self {
24257        Self::DEFAULT.clone()
24258    }
24259}
24260impl MessageData for PING_DATA {
24261    type Message = MavMessage;
24262    const ID: u32 = 4u32;
24263    const NAME: &'static str = "PING";
24264    const EXTRA_CRC: u8 = 237u8;
24265    const ENCODED_LEN: usize = 14usize;
24266    fn deser(
24267        _version: MavlinkVersion,
24268        __input: &[u8],
24269    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24270        let avail_len = __input.len();
24271        let mut payload_buf = [0; Self::ENCODED_LEN];
24272        let mut buf = if avail_len < Self::ENCODED_LEN {
24273            payload_buf[0..avail_len].copy_from_slice(__input);
24274            Bytes::new(&payload_buf)
24275        } else {
24276            Bytes::new(__input)
24277        };
24278        let mut __struct = Self::default();
24279        __struct.time_usec = buf.get_u64_le();
24280        __struct.seq = buf.get_u32_le();
24281        __struct.target_system = buf.get_u8();
24282        __struct.target_component = buf.get_u8();
24283        Ok(__struct)
24284    }
24285    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24286        let mut __tmp = BytesMut::new(bytes);
24287        #[allow(clippy::absurd_extreme_comparisons)]
24288        #[allow(unused_comparisons)]
24289        if __tmp.remaining() < Self::ENCODED_LEN {
24290            panic!(
24291                "buffer is too small (need {} bytes, but got {})",
24292                Self::ENCODED_LEN,
24293                __tmp.remaining(),
24294            )
24295        }
24296        __tmp.put_u64_le(self.time_usec);
24297        __tmp.put_u32_le(self.seq);
24298        __tmp.put_u8(self.target_system);
24299        __tmp.put_u8(self.target_component);
24300        if matches!(version, MavlinkVersion::V2) {
24301            let len = __tmp.len();
24302            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24303        } else {
24304            __tmp.len()
24305        }
24306    }
24307}
24308#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
24309#[doc = "Control vehicle tone generation (buzzer)."]
24310#[doc = ""]
24311#[doc = "ID: 258"]
24312#[derive(Debug, Clone, PartialEq)]
24313#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24314#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24315pub struct PLAY_TUNE_DATA {
24316    #[doc = "System ID"]
24317    pub target_system: u8,
24318    #[doc = "Component ID"]
24319    pub target_component: u8,
24320    #[doc = "tune in board specific format"]
24321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24322    pub tune: [u8; 30],
24323    #[doc = "tune extension (appended to tune)"]
24324    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24326    pub tune2: [u8; 200],
24327}
24328impl PLAY_TUNE_DATA {
24329    pub const ENCODED_LEN: usize = 232usize;
24330    pub const DEFAULT: Self = Self {
24331        target_system: 0_u8,
24332        target_component: 0_u8,
24333        tune: [0_u8; 30usize],
24334        tune2: [0_u8; 200usize],
24335    };
24336    #[cfg(feature = "arbitrary")]
24337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24338        use arbitrary::{Arbitrary, Unstructured};
24339        let mut buf = [0u8; 1024];
24340        rng.fill_bytes(&mut buf);
24341        let mut unstructured = Unstructured::new(&buf);
24342        Self::arbitrary(&mut unstructured).unwrap_or_default()
24343    }
24344}
24345impl Default for PLAY_TUNE_DATA {
24346    fn default() -> Self {
24347        Self::DEFAULT.clone()
24348    }
24349}
24350impl MessageData for PLAY_TUNE_DATA {
24351    type Message = MavMessage;
24352    const ID: u32 = 258u32;
24353    const NAME: &'static str = "PLAY_TUNE";
24354    const EXTRA_CRC: u8 = 187u8;
24355    const ENCODED_LEN: usize = 232usize;
24356    fn deser(
24357        _version: MavlinkVersion,
24358        __input: &[u8],
24359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24360        let avail_len = __input.len();
24361        let mut payload_buf = [0; Self::ENCODED_LEN];
24362        let mut buf = if avail_len < Self::ENCODED_LEN {
24363            payload_buf[0..avail_len].copy_from_slice(__input);
24364            Bytes::new(&payload_buf)
24365        } else {
24366            Bytes::new(__input)
24367        };
24368        let mut __struct = Self::default();
24369        __struct.target_system = buf.get_u8();
24370        __struct.target_component = buf.get_u8();
24371        for v in &mut __struct.tune {
24372            let val = buf.get_u8();
24373            *v = val;
24374        }
24375        for v in &mut __struct.tune2 {
24376            let val = buf.get_u8();
24377            *v = val;
24378        }
24379        Ok(__struct)
24380    }
24381    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24382        let mut __tmp = BytesMut::new(bytes);
24383        #[allow(clippy::absurd_extreme_comparisons)]
24384        #[allow(unused_comparisons)]
24385        if __tmp.remaining() < Self::ENCODED_LEN {
24386            panic!(
24387                "buffer is too small (need {} bytes, but got {})",
24388                Self::ENCODED_LEN,
24389                __tmp.remaining(),
24390            )
24391        }
24392        __tmp.put_u8(self.target_system);
24393        __tmp.put_u8(self.target_component);
24394        for val in &self.tune {
24395            __tmp.put_u8(*val);
24396        }
24397        for val in &self.tune2 {
24398            __tmp.put_u8(*val);
24399        }
24400        if matches!(version, MavlinkVersion::V2) {
24401            let len = __tmp.len();
24402            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24403        } else {
24404            __tmp.len()
24405        }
24406    }
24407}
24408#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
24409#[doc = ""]
24410#[doc = "ID: 400"]
24411#[derive(Debug, Clone, PartialEq)]
24412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24414pub struct PLAY_TUNE_V2_DATA {
24415    #[doc = "Tune format"]
24416    pub format: TuneFormat,
24417    #[doc = "System ID"]
24418    pub target_system: u8,
24419    #[doc = "Component ID"]
24420    pub target_component: u8,
24421    #[doc = "Tune definition as a NULL-terminated string."]
24422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24423    pub tune: [u8; 248],
24424}
24425impl PLAY_TUNE_V2_DATA {
24426    pub const ENCODED_LEN: usize = 254usize;
24427    pub const DEFAULT: Self = Self {
24428        format: TuneFormat::DEFAULT,
24429        target_system: 0_u8,
24430        target_component: 0_u8,
24431        tune: [0_u8; 248usize],
24432    };
24433    #[cfg(feature = "arbitrary")]
24434    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24435        use arbitrary::{Arbitrary, Unstructured};
24436        let mut buf = [0u8; 1024];
24437        rng.fill_bytes(&mut buf);
24438        let mut unstructured = Unstructured::new(&buf);
24439        Self::arbitrary(&mut unstructured).unwrap_or_default()
24440    }
24441}
24442impl Default for PLAY_TUNE_V2_DATA {
24443    fn default() -> Self {
24444        Self::DEFAULT.clone()
24445    }
24446}
24447impl MessageData for PLAY_TUNE_V2_DATA {
24448    type Message = MavMessage;
24449    const ID: u32 = 400u32;
24450    const NAME: &'static str = "PLAY_TUNE_V2";
24451    const EXTRA_CRC: u8 = 110u8;
24452    const ENCODED_LEN: usize = 254usize;
24453    fn deser(
24454        _version: MavlinkVersion,
24455        __input: &[u8],
24456    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24457        let avail_len = __input.len();
24458        let mut payload_buf = [0; Self::ENCODED_LEN];
24459        let mut buf = if avail_len < Self::ENCODED_LEN {
24460            payload_buf[0..avail_len].copy_from_slice(__input);
24461            Bytes::new(&payload_buf)
24462        } else {
24463            Bytes::new(__input)
24464        };
24465        let mut __struct = Self::default();
24466        let tmp = buf.get_u32_le();
24467        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
24468            ::mavlink_core::error::ParserError::InvalidEnum {
24469                enum_type: "TuneFormat",
24470                value: tmp as u32,
24471            },
24472        )?;
24473        __struct.target_system = buf.get_u8();
24474        __struct.target_component = buf.get_u8();
24475        for v in &mut __struct.tune {
24476            let val = buf.get_u8();
24477            *v = val;
24478        }
24479        Ok(__struct)
24480    }
24481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24482        let mut __tmp = BytesMut::new(bytes);
24483        #[allow(clippy::absurd_extreme_comparisons)]
24484        #[allow(unused_comparisons)]
24485        if __tmp.remaining() < Self::ENCODED_LEN {
24486            panic!(
24487                "buffer is too small (need {} bytes, but got {})",
24488                Self::ENCODED_LEN,
24489                __tmp.remaining(),
24490            )
24491        }
24492        __tmp.put_u32_le(self.format as u32);
24493        __tmp.put_u8(self.target_system);
24494        __tmp.put_u8(self.target_component);
24495        for val in &self.tune {
24496            __tmp.put_u8(*val);
24497        }
24498        if matches!(version, MavlinkVersion::V2) {
24499            let len = __tmp.len();
24500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24501        } else {
24502            __tmp.len()
24503        }
24504    }
24505}
24506#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
24507#[doc = ""]
24508#[doc = "ID: 87"]
24509#[derive(Debug, Clone, PartialEq)]
24510#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24511#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24512pub struct POSITION_TARGET_GLOBAL_INT_DATA {
24513    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
24514    pub time_boot_ms: u32,
24515    #[doc = "Latitude in WGS84 frame"]
24516    pub lat_int: i32,
24517    #[doc = "Longitude in WGS84 frame"]
24518    pub lon_int: i32,
24519    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
24520    pub alt: f32,
24521    #[doc = "X velocity in NED frame"]
24522    pub vx: f32,
24523    #[doc = "Y velocity in NED frame"]
24524    pub vy: f32,
24525    #[doc = "Z velocity in NED frame"]
24526    pub vz: f32,
24527    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24528    pub afx: f32,
24529    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24530    pub afy: f32,
24531    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24532    pub afz: f32,
24533    #[doc = "yaw setpoint"]
24534    pub yaw: f32,
24535    #[doc = "yaw rate setpoint"]
24536    pub yaw_rate: f32,
24537    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24538    pub type_mask: PositionTargetTypemask,
24539    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
24540    pub coordinate_frame: MavFrame,
24541}
24542impl POSITION_TARGET_GLOBAL_INT_DATA {
24543    pub const ENCODED_LEN: usize = 51usize;
24544    pub const DEFAULT: Self = Self {
24545        time_boot_ms: 0_u32,
24546        lat_int: 0_i32,
24547        lon_int: 0_i32,
24548        alt: 0.0_f32,
24549        vx: 0.0_f32,
24550        vy: 0.0_f32,
24551        vz: 0.0_f32,
24552        afx: 0.0_f32,
24553        afy: 0.0_f32,
24554        afz: 0.0_f32,
24555        yaw: 0.0_f32,
24556        yaw_rate: 0.0_f32,
24557        type_mask: PositionTargetTypemask::DEFAULT,
24558        coordinate_frame: MavFrame::DEFAULT,
24559    };
24560    #[cfg(feature = "arbitrary")]
24561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24562        use arbitrary::{Arbitrary, Unstructured};
24563        let mut buf = [0u8; 1024];
24564        rng.fill_bytes(&mut buf);
24565        let mut unstructured = Unstructured::new(&buf);
24566        Self::arbitrary(&mut unstructured).unwrap_or_default()
24567    }
24568}
24569impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
24570    fn default() -> Self {
24571        Self::DEFAULT.clone()
24572    }
24573}
24574impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
24575    type Message = MavMessage;
24576    const ID: u32 = 87u32;
24577    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
24578    const EXTRA_CRC: u8 = 150u8;
24579    const ENCODED_LEN: usize = 51usize;
24580    fn deser(
24581        _version: MavlinkVersion,
24582        __input: &[u8],
24583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24584        let avail_len = __input.len();
24585        let mut payload_buf = [0; Self::ENCODED_LEN];
24586        let mut buf = if avail_len < Self::ENCODED_LEN {
24587            payload_buf[0..avail_len].copy_from_slice(__input);
24588            Bytes::new(&payload_buf)
24589        } else {
24590            Bytes::new(__input)
24591        };
24592        let mut __struct = Self::default();
24593        __struct.time_boot_ms = buf.get_u32_le();
24594        __struct.lat_int = buf.get_i32_le();
24595        __struct.lon_int = buf.get_i32_le();
24596        __struct.alt = buf.get_f32_le();
24597        __struct.vx = buf.get_f32_le();
24598        __struct.vy = buf.get_f32_le();
24599        __struct.vz = buf.get_f32_le();
24600        __struct.afx = buf.get_f32_le();
24601        __struct.afy = buf.get_f32_le();
24602        __struct.afz = buf.get_f32_le();
24603        __struct.yaw = buf.get_f32_le();
24604        __struct.yaw_rate = buf.get_f32_le();
24605        let tmp = buf.get_u16_le();
24606        __struct.type_mask = PositionTargetTypemask::from_bits(
24607            tmp & PositionTargetTypemask::all().bits(),
24608        )
24609        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24610            flag_type: "PositionTargetTypemask",
24611            value: tmp as u32,
24612        })?;
24613        let tmp = buf.get_u8();
24614        __struct.coordinate_frame =
24615            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24616                enum_type: "MavFrame",
24617                value: tmp as u32,
24618            })?;
24619        Ok(__struct)
24620    }
24621    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24622        let mut __tmp = BytesMut::new(bytes);
24623        #[allow(clippy::absurd_extreme_comparisons)]
24624        #[allow(unused_comparisons)]
24625        if __tmp.remaining() < Self::ENCODED_LEN {
24626            panic!(
24627                "buffer is too small (need {} bytes, but got {})",
24628                Self::ENCODED_LEN,
24629                __tmp.remaining(),
24630            )
24631        }
24632        __tmp.put_u32_le(self.time_boot_ms);
24633        __tmp.put_i32_le(self.lat_int);
24634        __tmp.put_i32_le(self.lon_int);
24635        __tmp.put_f32_le(self.alt);
24636        __tmp.put_f32_le(self.vx);
24637        __tmp.put_f32_le(self.vy);
24638        __tmp.put_f32_le(self.vz);
24639        __tmp.put_f32_le(self.afx);
24640        __tmp.put_f32_le(self.afy);
24641        __tmp.put_f32_le(self.afz);
24642        __tmp.put_f32_le(self.yaw);
24643        __tmp.put_f32_le(self.yaw_rate);
24644        __tmp.put_u16_le(self.type_mask.bits());
24645        __tmp.put_u8(self.coordinate_frame as u8);
24646        if matches!(version, MavlinkVersion::V2) {
24647            let len = __tmp.len();
24648            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24649        } else {
24650            __tmp.len()
24651        }
24652    }
24653}
24654#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
24655#[doc = ""]
24656#[doc = "ID: 85"]
24657#[derive(Debug, Clone, PartialEq)]
24658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24660pub struct POSITION_TARGET_LOCAL_NED_DATA {
24661    #[doc = "Timestamp (time since system boot)."]
24662    pub time_boot_ms: u32,
24663    #[doc = "X Position in NED frame"]
24664    pub x: f32,
24665    #[doc = "Y Position in NED frame"]
24666    pub y: f32,
24667    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
24668    pub z: f32,
24669    #[doc = "X velocity in NED frame"]
24670    pub vx: f32,
24671    #[doc = "Y velocity in NED frame"]
24672    pub vy: f32,
24673    #[doc = "Z velocity in NED frame"]
24674    pub vz: f32,
24675    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24676    pub afx: f32,
24677    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24678    pub afy: f32,
24679    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
24680    pub afz: f32,
24681    #[doc = "yaw setpoint"]
24682    pub yaw: f32,
24683    #[doc = "yaw rate setpoint"]
24684    pub yaw_rate: f32,
24685    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
24686    pub type_mask: PositionTargetTypemask,
24687    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
24688    pub coordinate_frame: MavFrame,
24689}
24690impl POSITION_TARGET_LOCAL_NED_DATA {
24691    pub const ENCODED_LEN: usize = 51usize;
24692    pub const DEFAULT: Self = Self {
24693        time_boot_ms: 0_u32,
24694        x: 0.0_f32,
24695        y: 0.0_f32,
24696        z: 0.0_f32,
24697        vx: 0.0_f32,
24698        vy: 0.0_f32,
24699        vz: 0.0_f32,
24700        afx: 0.0_f32,
24701        afy: 0.0_f32,
24702        afz: 0.0_f32,
24703        yaw: 0.0_f32,
24704        yaw_rate: 0.0_f32,
24705        type_mask: PositionTargetTypemask::DEFAULT,
24706        coordinate_frame: MavFrame::DEFAULT,
24707    };
24708    #[cfg(feature = "arbitrary")]
24709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24710        use arbitrary::{Arbitrary, Unstructured};
24711        let mut buf = [0u8; 1024];
24712        rng.fill_bytes(&mut buf);
24713        let mut unstructured = Unstructured::new(&buf);
24714        Self::arbitrary(&mut unstructured).unwrap_or_default()
24715    }
24716}
24717impl Default for POSITION_TARGET_LOCAL_NED_DATA {
24718    fn default() -> Self {
24719        Self::DEFAULT.clone()
24720    }
24721}
24722impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
24723    type Message = MavMessage;
24724    const ID: u32 = 85u32;
24725    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
24726    const EXTRA_CRC: u8 = 140u8;
24727    const ENCODED_LEN: usize = 51usize;
24728    fn deser(
24729        _version: MavlinkVersion,
24730        __input: &[u8],
24731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24732        let avail_len = __input.len();
24733        let mut payload_buf = [0; Self::ENCODED_LEN];
24734        let mut buf = if avail_len < Self::ENCODED_LEN {
24735            payload_buf[0..avail_len].copy_from_slice(__input);
24736            Bytes::new(&payload_buf)
24737        } else {
24738            Bytes::new(__input)
24739        };
24740        let mut __struct = Self::default();
24741        __struct.time_boot_ms = buf.get_u32_le();
24742        __struct.x = buf.get_f32_le();
24743        __struct.y = buf.get_f32_le();
24744        __struct.z = buf.get_f32_le();
24745        __struct.vx = buf.get_f32_le();
24746        __struct.vy = buf.get_f32_le();
24747        __struct.vz = buf.get_f32_le();
24748        __struct.afx = buf.get_f32_le();
24749        __struct.afy = buf.get_f32_le();
24750        __struct.afz = buf.get_f32_le();
24751        __struct.yaw = buf.get_f32_le();
24752        __struct.yaw_rate = buf.get_f32_le();
24753        let tmp = buf.get_u16_le();
24754        __struct.type_mask = PositionTargetTypemask::from_bits(
24755            tmp & PositionTargetTypemask::all().bits(),
24756        )
24757        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24758            flag_type: "PositionTargetTypemask",
24759            value: tmp as u32,
24760        })?;
24761        let tmp = buf.get_u8();
24762        __struct.coordinate_frame =
24763            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24764                enum_type: "MavFrame",
24765                value: tmp as u32,
24766            })?;
24767        Ok(__struct)
24768    }
24769    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24770        let mut __tmp = BytesMut::new(bytes);
24771        #[allow(clippy::absurd_extreme_comparisons)]
24772        #[allow(unused_comparisons)]
24773        if __tmp.remaining() < Self::ENCODED_LEN {
24774            panic!(
24775                "buffer is too small (need {} bytes, but got {})",
24776                Self::ENCODED_LEN,
24777                __tmp.remaining(),
24778            )
24779        }
24780        __tmp.put_u32_le(self.time_boot_ms);
24781        __tmp.put_f32_le(self.x);
24782        __tmp.put_f32_le(self.y);
24783        __tmp.put_f32_le(self.z);
24784        __tmp.put_f32_le(self.vx);
24785        __tmp.put_f32_le(self.vy);
24786        __tmp.put_f32_le(self.vz);
24787        __tmp.put_f32_le(self.afx);
24788        __tmp.put_f32_le(self.afy);
24789        __tmp.put_f32_le(self.afz);
24790        __tmp.put_f32_le(self.yaw);
24791        __tmp.put_f32_le(self.yaw_rate);
24792        __tmp.put_u16_le(self.type_mask.bits());
24793        __tmp.put_u8(self.coordinate_frame as u8);
24794        if matches!(version, MavlinkVersion::V2) {
24795            let len = __tmp.len();
24796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24797        } else {
24798            __tmp.len()
24799        }
24800    }
24801}
24802#[doc = "Power supply status."]
24803#[doc = ""]
24804#[doc = "ID: 125"]
24805#[derive(Debug, Clone, PartialEq)]
24806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24808pub struct POWER_STATUS_DATA {
24809    #[doc = "5V rail voltage."]
24810    pub Vcc: u16,
24811    #[doc = "Servo rail voltage."]
24812    pub Vservo: u16,
24813    #[doc = "Bitmap of power supply status flags."]
24814    pub flags: MavPowerStatus,
24815}
24816impl POWER_STATUS_DATA {
24817    pub const ENCODED_LEN: usize = 6usize;
24818    pub const DEFAULT: Self = Self {
24819        Vcc: 0_u16,
24820        Vservo: 0_u16,
24821        flags: MavPowerStatus::DEFAULT,
24822    };
24823    #[cfg(feature = "arbitrary")]
24824    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24825        use arbitrary::{Arbitrary, Unstructured};
24826        let mut buf = [0u8; 1024];
24827        rng.fill_bytes(&mut buf);
24828        let mut unstructured = Unstructured::new(&buf);
24829        Self::arbitrary(&mut unstructured).unwrap_or_default()
24830    }
24831}
24832impl Default for POWER_STATUS_DATA {
24833    fn default() -> Self {
24834        Self::DEFAULT.clone()
24835    }
24836}
24837impl MessageData for POWER_STATUS_DATA {
24838    type Message = MavMessage;
24839    const ID: u32 = 125u32;
24840    const NAME: &'static str = "POWER_STATUS";
24841    const EXTRA_CRC: u8 = 203u8;
24842    const ENCODED_LEN: usize = 6usize;
24843    fn deser(
24844        _version: MavlinkVersion,
24845        __input: &[u8],
24846    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24847        let avail_len = __input.len();
24848        let mut payload_buf = [0; Self::ENCODED_LEN];
24849        let mut buf = if avail_len < Self::ENCODED_LEN {
24850            payload_buf[0..avail_len].copy_from_slice(__input);
24851            Bytes::new(&payload_buf)
24852        } else {
24853            Bytes::new(__input)
24854        };
24855        let mut __struct = Self::default();
24856        __struct.Vcc = buf.get_u16_le();
24857        __struct.Vservo = buf.get_u16_le();
24858        let tmp = buf.get_u16_le();
24859        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24860            ::mavlink_core::error::ParserError::InvalidFlag {
24861                flag_type: "MavPowerStatus",
24862                value: tmp as u32,
24863            },
24864        )?;
24865        Ok(__struct)
24866    }
24867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24868        let mut __tmp = BytesMut::new(bytes);
24869        #[allow(clippy::absurd_extreme_comparisons)]
24870        #[allow(unused_comparisons)]
24871        if __tmp.remaining() < Self::ENCODED_LEN {
24872            panic!(
24873                "buffer is too small (need {} bytes, but got {})",
24874                Self::ENCODED_LEN,
24875                __tmp.remaining(),
24876            )
24877        }
24878        __tmp.put_u16_le(self.Vcc);
24879        __tmp.put_u16_le(self.Vservo);
24880        __tmp.put_u16_le(self.flags.bits());
24881        if matches!(version, MavlinkVersion::V2) {
24882            let len = __tmp.len();
24883            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24884        } else {
24885            __tmp.len()
24886        }
24887    }
24888}
24889#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24890#[doc = ""]
24891#[doc = "ID: 300"]
24892#[derive(Debug, Clone, PartialEq)]
24893#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24894#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24895pub struct PROTOCOL_VERSION_DATA {
24896    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24897    pub version: u16,
24898    #[doc = "Minimum MAVLink version supported"]
24899    pub min_version: u16,
24900    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24901    pub max_version: u16,
24902    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24904    pub spec_version_hash: [u8; 8],
24905    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24907    pub library_version_hash: [u8; 8],
24908}
24909impl PROTOCOL_VERSION_DATA {
24910    pub const ENCODED_LEN: usize = 22usize;
24911    pub const DEFAULT: Self = Self {
24912        version: 0_u16,
24913        min_version: 0_u16,
24914        max_version: 0_u16,
24915        spec_version_hash: [0_u8; 8usize],
24916        library_version_hash: [0_u8; 8usize],
24917    };
24918    #[cfg(feature = "arbitrary")]
24919    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24920        use arbitrary::{Arbitrary, Unstructured};
24921        let mut buf = [0u8; 1024];
24922        rng.fill_bytes(&mut buf);
24923        let mut unstructured = Unstructured::new(&buf);
24924        Self::arbitrary(&mut unstructured).unwrap_or_default()
24925    }
24926}
24927impl Default for PROTOCOL_VERSION_DATA {
24928    fn default() -> Self {
24929        Self::DEFAULT.clone()
24930    }
24931}
24932impl MessageData for PROTOCOL_VERSION_DATA {
24933    type Message = MavMessage;
24934    const ID: u32 = 300u32;
24935    const NAME: &'static str = "PROTOCOL_VERSION";
24936    const EXTRA_CRC: u8 = 217u8;
24937    const ENCODED_LEN: usize = 22usize;
24938    fn deser(
24939        _version: MavlinkVersion,
24940        __input: &[u8],
24941    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24942        let avail_len = __input.len();
24943        let mut payload_buf = [0; Self::ENCODED_LEN];
24944        let mut buf = if avail_len < Self::ENCODED_LEN {
24945            payload_buf[0..avail_len].copy_from_slice(__input);
24946            Bytes::new(&payload_buf)
24947        } else {
24948            Bytes::new(__input)
24949        };
24950        let mut __struct = Self::default();
24951        __struct.version = buf.get_u16_le();
24952        __struct.min_version = buf.get_u16_le();
24953        __struct.max_version = buf.get_u16_le();
24954        for v in &mut __struct.spec_version_hash {
24955            let val = buf.get_u8();
24956            *v = val;
24957        }
24958        for v in &mut __struct.library_version_hash {
24959            let val = buf.get_u8();
24960            *v = val;
24961        }
24962        Ok(__struct)
24963    }
24964    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24965        let mut __tmp = BytesMut::new(bytes);
24966        #[allow(clippy::absurd_extreme_comparisons)]
24967        #[allow(unused_comparisons)]
24968        if __tmp.remaining() < Self::ENCODED_LEN {
24969            panic!(
24970                "buffer is too small (need {} bytes, but got {})",
24971                Self::ENCODED_LEN,
24972                __tmp.remaining(),
24973            )
24974        }
24975        __tmp.put_u16_le(self.version);
24976        __tmp.put_u16_le(self.min_version);
24977        __tmp.put_u16_le(self.max_version);
24978        for val in &self.spec_version_hash {
24979            __tmp.put_u8(*val);
24980        }
24981        for val in &self.library_version_hash {
24982            __tmp.put_u8(*val);
24983        }
24984        if matches!(version, MavlinkVersion::V2) {
24985            let len = __tmp.len();
24986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24987        } else {
24988            __tmp.len()
24989        }
24990    }
24991}
24992#[doc = "Status generated by radio and injected into MAVLink stream."]
24993#[doc = ""]
24994#[doc = "ID: 109"]
24995#[derive(Debug, Clone, PartialEq)]
24996#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24997#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24998pub struct RADIO_STATUS_DATA {
24999    #[doc = "Count of radio packet receive errors (since boot)."]
25000    pub rxerrors: u16,
25001    #[doc = "Count of error corrected radio packets (since boot)."]
25002    pub fixed: u16,
25003    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25004    pub rssi: u8,
25005    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25006    pub remrssi: u8,
25007    #[doc = "Remaining free transmitter buffer space."]
25008    pub txbuf: u8,
25009    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25010    pub noise: u8,
25011    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
25012    pub remnoise: u8,
25013}
25014impl RADIO_STATUS_DATA {
25015    pub const ENCODED_LEN: usize = 9usize;
25016    pub const DEFAULT: Self = Self {
25017        rxerrors: 0_u16,
25018        fixed: 0_u16,
25019        rssi: 0_u8,
25020        remrssi: 0_u8,
25021        txbuf: 0_u8,
25022        noise: 0_u8,
25023        remnoise: 0_u8,
25024    };
25025    #[cfg(feature = "arbitrary")]
25026    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25027        use arbitrary::{Arbitrary, Unstructured};
25028        let mut buf = [0u8; 1024];
25029        rng.fill_bytes(&mut buf);
25030        let mut unstructured = Unstructured::new(&buf);
25031        Self::arbitrary(&mut unstructured).unwrap_or_default()
25032    }
25033}
25034impl Default for RADIO_STATUS_DATA {
25035    fn default() -> Self {
25036        Self::DEFAULT.clone()
25037    }
25038}
25039impl MessageData for RADIO_STATUS_DATA {
25040    type Message = MavMessage;
25041    const ID: u32 = 109u32;
25042    const NAME: &'static str = "RADIO_STATUS";
25043    const EXTRA_CRC: u8 = 185u8;
25044    const ENCODED_LEN: usize = 9usize;
25045    fn deser(
25046        _version: MavlinkVersion,
25047        __input: &[u8],
25048    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25049        let avail_len = __input.len();
25050        let mut payload_buf = [0; Self::ENCODED_LEN];
25051        let mut buf = if avail_len < Self::ENCODED_LEN {
25052            payload_buf[0..avail_len].copy_from_slice(__input);
25053            Bytes::new(&payload_buf)
25054        } else {
25055            Bytes::new(__input)
25056        };
25057        let mut __struct = Self::default();
25058        __struct.rxerrors = buf.get_u16_le();
25059        __struct.fixed = buf.get_u16_le();
25060        __struct.rssi = buf.get_u8();
25061        __struct.remrssi = buf.get_u8();
25062        __struct.txbuf = buf.get_u8();
25063        __struct.noise = buf.get_u8();
25064        __struct.remnoise = buf.get_u8();
25065        Ok(__struct)
25066    }
25067    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25068        let mut __tmp = BytesMut::new(bytes);
25069        #[allow(clippy::absurd_extreme_comparisons)]
25070        #[allow(unused_comparisons)]
25071        if __tmp.remaining() < Self::ENCODED_LEN {
25072            panic!(
25073                "buffer is too small (need {} bytes, but got {})",
25074                Self::ENCODED_LEN,
25075                __tmp.remaining(),
25076            )
25077        }
25078        __tmp.put_u16_le(self.rxerrors);
25079        __tmp.put_u16_le(self.fixed);
25080        __tmp.put_u8(self.rssi);
25081        __tmp.put_u8(self.remrssi);
25082        __tmp.put_u8(self.txbuf);
25083        __tmp.put_u8(self.noise);
25084        __tmp.put_u8(self.remnoise);
25085        if matches!(version, MavlinkVersion::V2) {
25086            let len = __tmp.len();
25087            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25088        } else {
25089            __tmp.len()
25090        }
25091    }
25092}
25093#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
25094#[doc = ""]
25095#[doc = "ID: 27"]
25096#[derive(Debug, Clone, PartialEq)]
25097#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25098#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25099pub struct RAW_IMU_DATA {
25100    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25101    pub time_usec: u64,
25102    #[doc = "X acceleration (raw)"]
25103    pub xacc: i16,
25104    #[doc = "Y acceleration (raw)"]
25105    pub yacc: i16,
25106    #[doc = "Z acceleration (raw)"]
25107    pub zacc: i16,
25108    #[doc = "Angular speed around X axis (raw)"]
25109    pub xgyro: i16,
25110    #[doc = "Angular speed around Y axis (raw)"]
25111    pub ygyro: i16,
25112    #[doc = "Angular speed around Z axis (raw)"]
25113    pub zgyro: i16,
25114    #[doc = "X Magnetic field (raw)"]
25115    pub xmag: i16,
25116    #[doc = "Y Magnetic field (raw)"]
25117    pub ymag: i16,
25118    #[doc = "Z Magnetic field (raw)"]
25119    pub zmag: i16,
25120    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
25121    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25122    pub id: u8,
25123    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25124    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25125    pub temperature: i16,
25126}
25127impl RAW_IMU_DATA {
25128    pub const ENCODED_LEN: usize = 29usize;
25129    pub const DEFAULT: Self = Self {
25130        time_usec: 0_u64,
25131        xacc: 0_i16,
25132        yacc: 0_i16,
25133        zacc: 0_i16,
25134        xgyro: 0_i16,
25135        ygyro: 0_i16,
25136        zgyro: 0_i16,
25137        xmag: 0_i16,
25138        ymag: 0_i16,
25139        zmag: 0_i16,
25140        id: 0_u8,
25141        temperature: 0_i16,
25142    };
25143    #[cfg(feature = "arbitrary")]
25144    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25145        use arbitrary::{Arbitrary, Unstructured};
25146        let mut buf = [0u8; 1024];
25147        rng.fill_bytes(&mut buf);
25148        let mut unstructured = Unstructured::new(&buf);
25149        Self::arbitrary(&mut unstructured).unwrap_or_default()
25150    }
25151}
25152impl Default for RAW_IMU_DATA {
25153    fn default() -> Self {
25154        Self::DEFAULT.clone()
25155    }
25156}
25157impl MessageData for RAW_IMU_DATA {
25158    type Message = MavMessage;
25159    const ID: u32 = 27u32;
25160    const NAME: &'static str = "RAW_IMU";
25161    const EXTRA_CRC: u8 = 144u8;
25162    const ENCODED_LEN: usize = 29usize;
25163    fn deser(
25164        _version: MavlinkVersion,
25165        __input: &[u8],
25166    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25167        let avail_len = __input.len();
25168        let mut payload_buf = [0; Self::ENCODED_LEN];
25169        let mut buf = if avail_len < Self::ENCODED_LEN {
25170            payload_buf[0..avail_len].copy_from_slice(__input);
25171            Bytes::new(&payload_buf)
25172        } else {
25173            Bytes::new(__input)
25174        };
25175        let mut __struct = Self::default();
25176        __struct.time_usec = buf.get_u64_le();
25177        __struct.xacc = buf.get_i16_le();
25178        __struct.yacc = buf.get_i16_le();
25179        __struct.zacc = buf.get_i16_le();
25180        __struct.xgyro = buf.get_i16_le();
25181        __struct.ygyro = buf.get_i16_le();
25182        __struct.zgyro = buf.get_i16_le();
25183        __struct.xmag = buf.get_i16_le();
25184        __struct.ymag = buf.get_i16_le();
25185        __struct.zmag = buf.get_i16_le();
25186        __struct.id = buf.get_u8();
25187        __struct.temperature = buf.get_i16_le();
25188        Ok(__struct)
25189    }
25190    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25191        let mut __tmp = BytesMut::new(bytes);
25192        #[allow(clippy::absurd_extreme_comparisons)]
25193        #[allow(unused_comparisons)]
25194        if __tmp.remaining() < Self::ENCODED_LEN {
25195            panic!(
25196                "buffer is too small (need {} bytes, but got {})",
25197                Self::ENCODED_LEN,
25198                __tmp.remaining(),
25199            )
25200        }
25201        __tmp.put_u64_le(self.time_usec);
25202        __tmp.put_i16_le(self.xacc);
25203        __tmp.put_i16_le(self.yacc);
25204        __tmp.put_i16_le(self.zacc);
25205        __tmp.put_i16_le(self.xgyro);
25206        __tmp.put_i16_le(self.ygyro);
25207        __tmp.put_i16_le(self.zgyro);
25208        __tmp.put_i16_le(self.xmag);
25209        __tmp.put_i16_le(self.ymag);
25210        __tmp.put_i16_le(self.zmag);
25211        __tmp.put_u8(self.id);
25212        __tmp.put_i16_le(self.temperature);
25213        if matches!(version, MavlinkVersion::V2) {
25214            let len = __tmp.len();
25215            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25216        } else {
25217            __tmp.len()
25218        }
25219    }
25220}
25221#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
25222#[doc = ""]
25223#[doc = "ID: 28"]
25224#[derive(Debug, Clone, PartialEq)]
25225#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25226#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25227pub struct RAW_PRESSURE_DATA {
25228    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
25229    pub time_usec: u64,
25230    #[doc = "Absolute pressure (raw)"]
25231    pub press_abs: i16,
25232    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
25233    pub press_diff1: i16,
25234    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
25235    pub press_diff2: i16,
25236    #[doc = "Raw Temperature measurement (raw)"]
25237    pub temperature: i16,
25238}
25239impl RAW_PRESSURE_DATA {
25240    pub const ENCODED_LEN: usize = 16usize;
25241    pub const DEFAULT: Self = Self {
25242        time_usec: 0_u64,
25243        press_abs: 0_i16,
25244        press_diff1: 0_i16,
25245        press_diff2: 0_i16,
25246        temperature: 0_i16,
25247    };
25248    #[cfg(feature = "arbitrary")]
25249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25250        use arbitrary::{Arbitrary, Unstructured};
25251        let mut buf = [0u8; 1024];
25252        rng.fill_bytes(&mut buf);
25253        let mut unstructured = Unstructured::new(&buf);
25254        Self::arbitrary(&mut unstructured).unwrap_or_default()
25255    }
25256}
25257impl Default for RAW_PRESSURE_DATA {
25258    fn default() -> Self {
25259        Self::DEFAULT.clone()
25260    }
25261}
25262impl MessageData for RAW_PRESSURE_DATA {
25263    type Message = MavMessage;
25264    const ID: u32 = 28u32;
25265    const NAME: &'static str = "RAW_PRESSURE";
25266    const EXTRA_CRC: u8 = 67u8;
25267    const ENCODED_LEN: usize = 16usize;
25268    fn deser(
25269        _version: MavlinkVersion,
25270        __input: &[u8],
25271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25272        let avail_len = __input.len();
25273        let mut payload_buf = [0; Self::ENCODED_LEN];
25274        let mut buf = if avail_len < Self::ENCODED_LEN {
25275            payload_buf[0..avail_len].copy_from_slice(__input);
25276            Bytes::new(&payload_buf)
25277        } else {
25278            Bytes::new(__input)
25279        };
25280        let mut __struct = Self::default();
25281        __struct.time_usec = buf.get_u64_le();
25282        __struct.press_abs = buf.get_i16_le();
25283        __struct.press_diff1 = buf.get_i16_le();
25284        __struct.press_diff2 = buf.get_i16_le();
25285        __struct.temperature = buf.get_i16_le();
25286        Ok(__struct)
25287    }
25288    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25289        let mut __tmp = BytesMut::new(bytes);
25290        #[allow(clippy::absurd_extreme_comparisons)]
25291        #[allow(unused_comparisons)]
25292        if __tmp.remaining() < Self::ENCODED_LEN {
25293            panic!(
25294                "buffer is too small (need {} bytes, but got {})",
25295                Self::ENCODED_LEN,
25296                __tmp.remaining(),
25297            )
25298        }
25299        __tmp.put_u64_le(self.time_usec);
25300        __tmp.put_i16_le(self.press_abs);
25301        __tmp.put_i16_le(self.press_diff1);
25302        __tmp.put_i16_le(self.press_diff2);
25303        __tmp.put_i16_le(self.temperature);
25304        if matches!(version, MavlinkVersion::V2) {
25305            let len = __tmp.len();
25306            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25307        } else {
25308            __tmp.len()
25309        }
25310    }
25311}
25312#[doc = "RPM sensor data message."]
25313#[doc = ""]
25314#[doc = "ID: 339"]
25315#[derive(Debug, Clone, PartialEq)]
25316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25318pub struct RAW_RPM_DATA {
25319    #[doc = "Indicated rate"]
25320    pub frequency: f32,
25321    #[doc = "Index of this RPM sensor (0-indexed)"]
25322    pub index: u8,
25323}
25324impl RAW_RPM_DATA {
25325    pub const ENCODED_LEN: usize = 5usize;
25326    pub const DEFAULT: Self = Self {
25327        frequency: 0.0_f32,
25328        index: 0_u8,
25329    };
25330    #[cfg(feature = "arbitrary")]
25331    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25332        use arbitrary::{Arbitrary, Unstructured};
25333        let mut buf = [0u8; 1024];
25334        rng.fill_bytes(&mut buf);
25335        let mut unstructured = Unstructured::new(&buf);
25336        Self::arbitrary(&mut unstructured).unwrap_or_default()
25337    }
25338}
25339impl Default for RAW_RPM_DATA {
25340    fn default() -> Self {
25341        Self::DEFAULT.clone()
25342    }
25343}
25344impl MessageData for RAW_RPM_DATA {
25345    type Message = MavMessage;
25346    const ID: u32 = 339u32;
25347    const NAME: &'static str = "RAW_RPM";
25348    const EXTRA_CRC: u8 = 199u8;
25349    const ENCODED_LEN: usize = 5usize;
25350    fn deser(
25351        _version: MavlinkVersion,
25352        __input: &[u8],
25353    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25354        let avail_len = __input.len();
25355        let mut payload_buf = [0; Self::ENCODED_LEN];
25356        let mut buf = if avail_len < Self::ENCODED_LEN {
25357            payload_buf[0..avail_len].copy_from_slice(__input);
25358            Bytes::new(&payload_buf)
25359        } else {
25360            Bytes::new(__input)
25361        };
25362        let mut __struct = Self::default();
25363        __struct.frequency = buf.get_f32_le();
25364        __struct.index = buf.get_u8();
25365        Ok(__struct)
25366    }
25367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25368        let mut __tmp = BytesMut::new(bytes);
25369        #[allow(clippy::absurd_extreme_comparisons)]
25370        #[allow(unused_comparisons)]
25371        if __tmp.remaining() < Self::ENCODED_LEN {
25372            panic!(
25373                "buffer is too small (need {} bytes, but got {})",
25374                Self::ENCODED_LEN,
25375                __tmp.remaining(),
25376            )
25377        }
25378        __tmp.put_f32_le(self.frequency);
25379        __tmp.put_u8(self.index);
25380        if matches!(version, MavlinkVersion::V2) {
25381            let len = __tmp.len();
25382            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25383        } else {
25384            __tmp.len()
25385        }
25386    }
25387}
25388#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25389#[doc = ""]
25390#[doc = "ID: 65"]
25391#[derive(Debug, Clone, PartialEq)]
25392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25393#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25394pub struct RC_CHANNELS_DATA {
25395    #[doc = "Timestamp (time since system boot)."]
25396    pub time_boot_ms: u32,
25397    #[doc = "RC channel 1 value."]
25398    pub chan1_raw: u16,
25399    #[doc = "RC channel 2 value."]
25400    pub chan2_raw: u16,
25401    #[doc = "RC channel 3 value."]
25402    pub chan3_raw: u16,
25403    #[doc = "RC channel 4 value."]
25404    pub chan4_raw: u16,
25405    #[doc = "RC channel 5 value."]
25406    pub chan5_raw: u16,
25407    #[doc = "RC channel 6 value."]
25408    pub chan6_raw: u16,
25409    #[doc = "RC channel 7 value."]
25410    pub chan7_raw: u16,
25411    #[doc = "RC channel 8 value."]
25412    pub chan8_raw: u16,
25413    #[doc = "RC channel 9 value."]
25414    pub chan9_raw: u16,
25415    #[doc = "RC channel 10 value."]
25416    pub chan10_raw: u16,
25417    #[doc = "RC channel 11 value."]
25418    pub chan11_raw: u16,
25419    #[doc = "RC channel 12 value."]
25420    pub chan12_raw: u16,
25421    #[doc = "RC channel 13 value."]
25422    pub chan13_raw: u16,
25423    #[doc = "RC channel 14 value."]
25424    pub chan14_raw: u16,
25425    #[doc = "RC channel 15 value."]
25426    pub chan15_raw: u16,
25427    #[doc = "RC channel 16 value."]
25428    pub chan16_raw: u16,
25429    #[doc = "RC channel 17 value."]
25430    pub chan17_raw: u16,
25431    #[doc = "RC channel 18 value."]
25432    pub chan18_raw: u16,
25433    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
25434    pub chancount: u8,
25435    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25436    pub rssi: u8,
25437}
25438impl RC_CHANNELS_DATA {
25439    pub const ENCODED_LEN: usize = 42usize;
25440    pub const DEFAULT: Self = Self {
25441        time_boot_ms: 0_u32,
25442        chan1_raw: 0_u16,
25443        chan2_raw: 0_u16,
25444        chan3_raw: 0_u16,
25445        chan4_raw: 0_u16,
25446        chan5_raw: 0_u16,
25447        chan6_raw: 0_u16,
25448        chan7_raw: 0_u16,
25449        chan8_raw: 0_u16,
25450        chan9_raw: 0_u16,
25451        chan10_raw: 0_u16,
25452        chan11_raw: 0_u16,
25453        chan12_raw: 0_u16,
25454        chan13_raw: 0_u16,
25455        chan14_raw: 0_u16,
25456        chan15_raw: 0_u16,
25457        chan16_raw: 0_u16,
25458        chan17_raw: 0_u16,
25459        chan18_raw: 0_u16,
25460        chancount: 0_u8,
25461        rssi: 0_u8,
25462    };
25463    #[cfg(feature = "arbitrary")]
25464    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25465        use arbitrary::{Arbitrary, Unstructured};
25466        let mut buf = [0u8; 1024];
25467        rng.fill_bytes(&mut buf);
25468        let mut unstructured = Unstructured::new(&buf);
25469        Self::arbitrary(&mut unstructured).unwrap_or_default()
25470    }
25471}
25472impl Default for RC_CHANNELS_DATA {
25473    fn default() -> Self {
25474        Self::DEFAULT.clone()
25475    }
25476}
25477impl MessageData for RC_CHANNELS_DATA {
25478    type Message = MavMessage;
25479    const ID: u32 = 65u32;
25480    const NAME: &'static str = "RC_CHANNELS";
25481    const EXTRA_CRC: u8 = 118u8;
25482    const ENCODED_LEN: usize = 42usize;
25483    fn deser(
25484        _version: MavlinkVersion,
25485        __input: &[u8],
25486    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25487        let avail_len = __input.len();
25488        let mut payload_buf = [0; Self::ENCODED_LEN];
25489        let mut buf = if avail_len < Self::ENCODED_LEN {
25490            payload_buf[0..avail_len].copy_from_slice(__input);
25491            Bytes::new(&payload_buf)
25492        } else {
25493            Bytes::new(__input)
25494        };
25495        let mut __struct = Self::default();
25496        __struct.time_boot_ms = buf.get_u32_le();
25497        __struct.chan1_raw = buf.get_u16_le();
25498        __struct.chan2_raw = buf.get_u16_le();
25499        __struct.chan3_raw = buf.get_u16_le();
25500        __struct.chan4_raw = buf.get_u16_le();
25501        __struct.chan5_raw = buf.get_u16_le();
25502        __struct.chan6_raw = buf.get_u16_le();
25503        __struct.chan7_raw = buf.get_u16_le();
25504        __struct.chan8_raw = buf.get_u16_le();
25505        __struct.chan9_raw = buf.get_u16_le();
25506        __struct.chan10_raw = buf.get_u16_le();
25507        __struct.chan11_raw = buf.get_u16_le();
25508        __struct.chan12_raw = buf.get_u16_le();
25509        __struct.chan13_raw = buf.get_u16_le();
25510        __struct.chan14_raw = buf.get_u16_le();
25511        __struct.chan15_raw = buf.get_u16_le();
25512        __struct.chan16_raw = buf.get_u16_le();
25513        __struct.chan17_raw = buf.get_u16_le();
25514        __struct.chan18_raw = buf.get_u16_le();
25515        __struct.chancount = buf.get_u8();
25516        __struct.rssi = buf.get_u8();
25517        Ok(__struct)
25518    }
25519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25520        let mut __tmp = BytesMut::new(bytes);
25521        #[allow(clippy::absurd_extreme_comparisons)]
25522        #[allow(unused_comparisons)]
25523        if __tmp.remaining() < Self::ENCODED_LEN {
25524            panic!(
25525                "buffer is too small (need {} bytes, but got {})",
25526                Self::ENCODED_LEN,
25527                __tmp.remaining(),
25528            )
25529        }
25530        __tmp.put_u32_le(self.time_boot_ms);
25531        __tmp.put_u16_le(self.chan1_raw);
25532        __tmp.put_u16_le(self.chan2_raw);
25533        __tmp.put_u16_le(self.chan3_raw);
25534        __tmp.put_u16_le(self.chan4_raw);
25535        __tmp.put_u16_le(self.chan5_raw);
25536        __tmp.put_u16_le(self.chan6_raw);
25537        __tmp.put_u16_le(self.chan7_raw);
25538        __tmp.put_u16_le(self.chan8_raw);
25539        __tmp.put_u16_le(self.chan9_raw);
25540        __tmp.put_u16_le(self.chan10_raw);
25541        __tmp.put_u16_le(self.chan11_raw);
25542        __tmp.put_u16_le(self.chan12_raw);
25543        __tmp.put_u16_le(self.chan13_raw);
25544        __tmp.put_u16_le(self.chan14_raw);
25545        __tmp.put_u16_le(self.chan15_raw);
25546        __tmp.put_u16_le(self.chan16_raw);
25547        __tmp.put_u16_le(self.chan17_raw);
25548        __tmp.put_u16_le(self.chan18_raw);
25549        __tmp.put_u8(self.chancount);
25550        __tmp.put_u8(self.rssi);
25551        if matches!(version, MavlinkVersion::V2) {
25552            let len = __tmp.len();
25553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25554        } else {
25555            __tmp.len()
25556        }
25557    }
25558}
25559#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
25560#[doc = ""]
25561#[doc = "ID: 70"]
25562#[derive(Debug, Clone, PartialEq)]
25563#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25564#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25565pub struct RC_CHANNELS_OVERRIDE_DATA {
25566    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25567    pub chan1_raw: u16,
25568    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25569    pub chan2_raw: u16,
25570    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25571    pub chan3_raw: u16,
25572    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25573    pub chan4_raw: u16,
25574    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25575    pub chan5_raw: u16,
25576    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25577    pub chan6_raw: u16,
25578    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25579    pub chan7_raw: u16,
25580    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
25581    pub chan8_raw: u16,
25582    #[doc = "System ID"]
25583    pub target_system: u8,
25584    #[doc = "Component ID"]
25585    pub target_component: u8,
25586    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25587    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25588    pub chan9_raw: u16,
25589    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25590    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25591    pub chan10_raw: u16,
25592    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25593    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25594    pub chan11_raw: u16,
25595    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25596    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25597    pub chan12_raw: u16,
25598    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25599    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25600    pub chan13_raw: u16,
25601    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25602    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25603    pub chan14_raw: u16,
25604    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25605    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25606    pub chan15_raw: u16,
25607    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25608    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25609    pub chan16_raw: u16,
25610    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25611    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25612    pub chan17_raw: u16,
25613    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
25614    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25615    pub chan18_raw: u16,
25616}
25617impl RC_CHANNELS_OVERRIDE_DATA {
25618    pub const ENCODED_LEN: usize = 38usize;
25619    pub const DEFAULT: Self = Self {
25620        chan1_raw: 0_u16,
25621        chan2_raw: 0_u16,
25622        chan3_raw: 0_u16,
25623        chan4_raw: 0_u16,
25624        chan5_raw: 0_u16,
25625        chan6_raw: 0_u16,
25626        chan7_raw: 0_u16,
25627        chan8_raw: 0_u16,
25628        target_system: 0_u8,
25629        target_component: 0_u8,
25630        chan9_raw: 0_u16,
25631        chan10_raw: 0_u16,
25632        chan11_raw: 0_u16,
25633        chan12_raw: 0_u16,
25634        chan13_raw: 0_u16,
25635        chan14_raw: 0_u16,
25636        chan15_raw: 0_u16,
25637        chan16_raw: 0_u16,
25638        chan17_raw: 0_u16,
25639        chan18_raw: 0_u16,
25640    };
25641    #[cfg(feature = "arbitrary")]
25642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25643        use arbitrary::{Arbitrary, Unstructured};
25644        let mut buf = [0u8; 1024];
25645        rng.fill_bytes(&mut buf);
25646        let mut unstructured = Unstructured::new(&buf);
25647        Self::arbitrary(&mut unstructured).unwrap_or_default()
25648    }
25649}
25650impl Default for RC_CHANNELS_OVERRIDE_DATA {
25651    fn default() -> Self {
25652        Self::DEFAULT.clone()
25653    }
25654}
25655impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
25656    type Message = MavMessage;
25657    const ID: u32 = 70u32;
25658    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
25659    const EXTRA_CRC: u8 = 124u8;
25660    const ENCODED_LEN: usize = 38usize;
25661    fn deser(
25662        _version: MavlinkVersion,
25663        __input: &[u8],
25664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25665        let avail_len = __input.len();
25666        let mut payload_buf = [0; Self::ENCODED_LEN];
25667        let mut buf = if avail_len < Self::ENCODED_LEN {
25668            payload_buf[0..avail_len].copy_from_slice(__input);
25669            Bytes::new(&payload_buf)
25670        } else {
25671            Bytes::new(__input)
25672        };
25673        let mut __struct = Self::default();
25674        __struct.chan1_raw = buf.get_u16_le();
25675        __struct.chan2_raw = buf.get_u16_le();
25676        __struct.chan3_raw = buf.get_u16_le();
25677        __struct.chan4_raw = buf.get_u16_le();
25678        __struct.chan5_raw = buf.get_u16_le();
25679        __struct.chan6_raw = buf.get_u16_le();
25680        __struct.chan7_raw = buf.get_u16_le();
25681        __struct.chan8_raw = buf.get_u16_le();
25682        __struct.target_system = buf.get_u8();
25683        __struct.target_component = buf.get_u8();
25684        __struct.chan9_raw = buf.get_u16_le();
25685        __struct.chan10_raw = buf.get_u16_le();
25686        __struct.chan11_raw = buf.get_u16_le();
25687        __struct.chan12_raw = buf.get_u16_le();
25688        __struct.chan13_raw = buf.get_u16_le();
25689        __struct.chan14_raw = buf.get_u16_le();
25690        __struct.chan15_raw = buf.get_u16_le();
25691        __struct.chan16_raw = buf.get_u16_le();
25692        __struct.chan17_raw = buf.get_u16_le();
25693        __struct.chan18_raw = buf.get_u16_le();
25694        Ok(__struct)
25695    }
25696    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25697        let mut __tmp = BytesMut::new(bytes);
25698        #[allow(clippy::absurd_extreme_comparisons)]
25699        #[allow(unused_comparisons)]
25700        if __tmp.remaining() < Self::ENCODED_LEN {
25701            panic!(
25702                "buffer is too small (need {} bytes, but got {})",
25703                Self::ENCODED_LEN,
25704                __tmp.remaining(),
25705            )
25706        }
25707        __tmp.put_u16_le(self.chan1_raw);
25708        __tmp.put_u16_le(self.chan2_raw);
25709        __tmp.put_u16_le(self.chan3_raw);
25710        __tmp.put_u16_le(self.chan4_raw);
25711        __tmp.put_u16_le(self.chan5_raw);
25712        __tmp.put_u16_le(self.chan6_raw);
25713        __tmp.put_u16_le(self.chan7_raw);
25714        __tmp.put_u16_le(self.chan8_raw);
25715        __tmp.put_u8(self.target_system);
25716        __tmp.put_u8(self.target_component);
25717        __tmp.put_u16_le(self.chan9_raw);
25718        __tmp.put_u16_le(self.chan10_raw);
25719        __tmp.put_u16_le(self.chan11_raw);
25720        __tmp.put_u16_le(self.chan12_raw);
25721        __tmp.put_u16_le(self.chan13_raw);
25722        __tmp.put_u16_le(self.chan14_raw);
25723        __tmp.put_u16_le(self.chan15_raw);
25724        __tmp.put_u16_le(self.chan16_raw);
25725        __tmp.put_u16_le(self.chan17_raw);
25726        __tmp.put_u16_le(self.chan18_raw);
25727        if matches!(version, MavlinkVersion::V2) {
25728            let len = __tmp.len();
25729            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25730        } else {
25731            __tmp.len()
25732        }
25733    }
25734}
25735#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25736#[doc = ""]
25737#[doc = "ID: 35"]
25738#[derive(Debug, Clone, PartialEq)]
25739#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25740#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25741pub struct RC_CHANNELS_RAW_DATA {
25742    #[doc = "Timestamp (time since system boot)."]
25743    pub time_boot_ms: u32,
25744    #[doc = "RC channel 1 value."]
25745    pub chan1_raw: u16,
25746    #[doc = "RC channel 2 value."]
25747    pub chan2_raw: u16,
25748    #[doc = "RC channel 3 value."]
25749    pub chan3_raw: u16,
25750    #[doc = "RC channel 4 value."]
25751    pub chan4_raw: u16,
25752    #[doc = "RC channel 5 value."]
25753    pub chan5_raw: u16,
25754    #[doc = "RC channel 6 value."]
25755    pub chan6_raw: u16,
25756    #[doc = "RC channel 7 value."]
25757    pub chan7_raw: u16,
25758    #[doc = "RC channel 8 value."]
25759    pub chan8_raw: u16,
25760    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25761    pub port: u8,
25762    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25763    pub rssi: u8,
25764}
25765impl RC_CHANNELS_RAW_DATA {
25766    pub const ENCODED_LEN: usize = 22usize;
25767    pub const DEFAULT: Self = Self {
25768        time_boot_ms: 0_u32,
25769        chan1_raw: 0_u16,
25770        chan2_raw: 0_u16,
25771        chan3_raw: 0_u16,
25772        chan4_raw: 0_u16,
25773        chan5_raw: 0_u16,
25774        chan6_raw: 0_u16,
25775        chan7_raw: 0_u16,
25776        chan8_raw: 0_u16,
25777        port: 0_u8,
25778        rssi: 0_u8,
25779    };
25780    #[cfg(feature = "arbitrary")]
25781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25782        use arbitrary::{Arbitrary, Unstructured};
25783        let mut buf = [0u8; 1024];
25784        rng.fill_bytes(&mut buf);
25785        let mut unstructured = Unstructured::new(&buf);
25786        Self::arbitrary(&mut unstructured).unwrap_or_default()
25787    }
25788}
25789impl Default for RC_CHANNELS_RAW_DATA {
25790    fn default() -> Self {
25791        Self::DEFAULT.clone()
25792    }
25793}
25794impl MessageData for RC_CHANNELS_RAW_DATA {
25795    type Message = MavMessage;
25796    const ID: u32 = 35u32;
25797    const NAME: &'static str = "RC_CHANNELS_RAW";
25798    const EXTRA_CRC: u8 = 244u8;
25799    const ENCODED_LEN: usize = 22usize;
25800    fn deser(
25801        _version: MavlinkVersion,
25802        __input: &[u8],
25803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25804        let avail_len = __input.len();
25805        let mut payload_buf = [0; Self::ENCODED_LEN];
25806        let mut buf = if avail_len < Self::ENCODED_LEN {
25807            payload_buf[0..avail_len].copy_from_slice(__input);
25808            Bytes::new(&payload_buf)
25809        } else {
25810            Bytes::new(__input)
25811        };
25812        let mut __struct = Self::default();
25813        __struct.time_boot_ms = buf.get_u32_le();
25814        __struct.chan1_raw = buf.get_u16_le();
25815        __struct.chan2_raw = buf.get_u16_le();
25816        __struct.chan3_raw = buf.get_u16_le();
25817        __struct.chan4_raw = buf.get_u16_le();
25818        __struct.chan5_raw = buf.get_u16_le();
25819        __struct.chan6_raw = buf.get_u16_le();
25820        __struct.chan7_raw = buf.get_u16_le();
25821        __struct.chan8_raw = buf.get_u16_le();
25822        __struct.port = buf.get_u8();
25823        __struct.rssi = buf.get_u8();
25824        Ok(__struct)
25825    }
25826    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25827        let mut __tmp = BytesMut::new(bytes);
25828        #[allow(clippy::absurd_extreme_comparisons)]
25829        #[allow(unused_comparisons)]
25830        if __tmp.remaining() < Self::ENCODED_LEN {
25831            panic!(
25832                "buffer is too small (need {} bytes, but got {})",
25833                Self::ENCODED_LEN,
25834                __tmp.remaining(),
25835            )
25836        }
25837        __tmp.put_u32_le(self.time_boot_ms);
25838        __tmp.put_u16_le(self.chan1_raw);
25839        __tmp.put_u16_le(self.chan2_raw);
25840        __tmp.put_u16_le(self.chan3_raw);
25841        __tmp.put_u16_le(self.chan4_raw);
25842        __tmp.put_u16_le(self.chan5_raw);
25843        __tmp.put_u16_le(self.chan6_raw);
25844        __tmp.put_u16_le(self.chan7_raw);
25845        __tmp.put_u16_le(self.chan8_raw);
25846        __tmp.put_u8(self.port);
25847        __tmp.put_u8(self.rssi);
25848        if matches!(version, MavlinkVersion::V2) {
25849            let len = __tmp.len();
25850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25851        } else {
25852            __tmp.len()
25853        }
25854    }
25855}
25856#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25857#[doc = ""]
25858#[doc = "ID: 34"]
25859#[derive(Debug, Clone, PartialEq)]
25860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25862pub struct RC_CHANNELS_SCALED_DATA {
25863    #[doc = "Timestamp (time since system boot)."]
25864    pub time_boot_ms: u32,
25865    #[doc = "RC channel 1 value scaled."]
25866    pub chan1_scaled: i16,
25867    #[doc = "RC channel 2 value scaled."]
25868    pub chan2_scaled: i16,
25869    #[doc = "RC channel 3 value scaled."]
25870    pub chan3_scaled: i16,
25871    #[doc = "RC channel 4 value scaled."]
25872    pub chan4_scaled: i16,
25873    #[doc = "RC channel 5 value scaled."]
25874    pub chan5_scaled: i16,
25875    #[doc = "RC channel 6 value scaled."]
25876    pub chan6_scaled: i16,
25877    #[doc = "RC channel 7 value scaled."]
25878    pub chan7_scaled: i16,
25879    #[doc = "RC channel 8 value scaled."]
25880    pub chan8_scaled: i16,
25881    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25882    pub port: u8,
25883    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25884    pub rssi: u8,
25885}
25886impl RC_CHANNELS_SCALED_DATA {
25887    pub const ENCODED_LEN: usize = 22usize;
25888    pub const DEFAULT: Self = Self {
25889        time_boot_ms: 0_u32,
25890        chan1_scaled: 0_i16,
25891        chan2_scaled: 0_i16,
25892        chan3_scaled: 0_i16,
25893        chan4_scaled: 0_i16,
25894        chan5_scaled: 0_i16,
25895        chan6_scaled: 0_i16,
25896        chan7_scaled: 0_i16,
25897        chan8_scaled: 0_i16,
25898        port: 0_u8,
25899        rssi: 0_u8,
25900    };
25901    #[cfg(feature = "arbitrary")]
25902    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25903        use arbitrary::{Arbitrary, Unstructured};
25904        let mut buf = [0u8; 1024];
25905        rng.fill_bytes(&mut buf);
25906        let mut unstructured = Unstructured::new(&buf);
25907        Self::arbitrary(&mut unstructured).unwrap_or_default()
25908    }
25909}
25910impl Default for RC_CHANNELS_SCALED_DATA {
25911    fn default() -> Self {
25912        Self::DEFAULT.clone()
25913    }
25914}
25915impl MessageData for RC_CHANNELS_SCALED_DATA {
25916    type Message = MavMessage;
25917    const ID: u32 = 34u32;
25918    const NAME: &'static str = "RC_CHANNELS_SCALED";
25919    const EXTRA_CRC: u8 = 237u8;
25920    const ENCODED_LEN: usize = 22usize;
25921    fn deser(
25922        _version: MavlinkVersion,
25923        __input: &[u8],
25924    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25925        let avail_len = __input.len();
25926        let mut payload_buf = [0; Self::ENCODED_LEN];
25927        let mut buf = if avail_len < Self::ENCODED_LEN {
25928            payload_buf[0..avail_len].copy_from_slice(__input);
25929            Bytes::new(&payload_buf)
25930        } else {
25931            Bytes::new(__input)
25932        };
25933        let mut __struct = Self::default();
25934        __struct.time_boot_ms = buf.get_u32_le();
25935        __struct.chan1_scaled = buf.get_i16_le();
25936        __struct.chan2_scaled = buf.get_i16_le();
25937        __struct.chan3_scaled = buf.get_i16_le();
25938        __struct.chan4_scaled = buf.get_i16_le();
25939        __struct.chan5_scaled = buf.get_i16_le();
25940        __struct.chan6_scaled = buf.get_i16_le();
25941        __struct.chan7_scaled = buf.get_i16_le();
25942        __struct.chan8_scaled = buf.get_i16_le();
25943        __struct.port = buf.get_u8();
25944        __struct.rssi = buf.get_u8();
25945        Ok(__struct)
25946    }
25947    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25948        let mut __tmp = BytesMut::new(bytes);
25949        #[allow(clippy::absurd_extreme_comparisons)]
25950        #[allow(unused_comparisons)]
25951        if __tmp.remaining() < Self::ENCODED_LEN {
25952            panic!(
25953                "buffer is too small (need {} bytes, but got {})",
25954                Self::ENCODED_LEN,
25955                __tmp.remaining(),
25956            )
25957        }
25958        __tmp.put_u32_le(self.time_boot_ms);
25959        __tmp.put_i16_le(self.chan1_scaled);
25960        __tmp.put_i16_le(self.chan2_scaled);
25961        __tmp.put_i16_le(self.chan3_scaled);
25962        __tmp.put_i16_le(self.chan4_scaled);
25963        __tmp.put_i16_le(self.chan5_scaled);
25964        __tmp.put_i16_le(self.chan6_scaled);
25965        __tmp.put_i16_le(self.chan7_scaled);
25966        __tmp.put_i16_le(self.chan8_scaled);
25967        __tmp.put_u8(self.port);
25968        __tmp.put_u8(self.rssi);
25969        if matches!(version, MavlinkVersion::V2) {
25970            let len = __tmp.len();
25971            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25972        } else {
25973            __tmp.len()
25974        }
25975    }
25976}
25977#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25978#[doc = "Request a data stream."]
25979#[doc = ""]
25980#[doc = "ID: 66"]
25981#[derive(Debug, Clone, PartialEq)]
25982#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25984pub struct REQUEST_DATA_STREAM_DATA {
25985    #[doc = "The requested message rate"]
25986    pub req_message_rate: u16,
25987    #[doc = "The target requested to send the message stream."]
25988    pub target_system: u8,
25989    #[doc = "The target requested to send the message stream."]
25990    pub target_component: u8,
25991    #[doc = "The ID of the requested data stream"]
25992    pub req_stream_id: u8,
25993    #[doc = "1 to start sending, 0 to stop sending."]
25994    pub start_stop: u8,
25995}
25996impl REQUEST_DATA_STREAM_DATA {
25997    pub const ENCODED_LEN: usize = 6usize;
25998    pub const DEFAULT: Self = Self {
25999        req_message_rate: 0_u16,
26000        target_system: 0_u8,
26001        target_component: 0_u8,
26002        req_stream_id: 0_u8,
26003        start_stop: 0_u8,
26004    };
26005    #[cfg(feature = "arbitrary")]
26006    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26007        use arbitrary::{Arbitrary, Unstructured};
26008        let mut buf = [0u8; 1024];
26009        rng.fill_bytes(&mut buf);
26010        let mut unstructured = Unstructured::new(&buf);
26011        Self::arbitrary(&mut unstructured).unwrap_or_default()
26012    }
26013}
26014impl Default for REQUEST_DATA_STREAM_DATA {
26015    fn default() -> Self {
26016        Self::DEFAULT.clone()
26017    }
26018}
26019impl MessageData for REQUEST_DATA_STREAM_DATA {
26020    type Message = MavMessage;
26021    const ID: u32 = 66u32;
26022    const NAME: &'static str = "REQUEST_DATA_STREAM";
26023    const EXTRA_CRC: u8 = 148u8;
26024    const ENCODED_LEN: usize = 6usize;
26025    fn deser(
26026        _version: MavlinkVersion,
26027        __input: &[u8],
26028    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26029        let avail_len = __input.len();
26030        let mut payload_buf = [0; Self::ENCODED_LEN];
26031        let mut buf = if avail_len < Self::ENCODED_LEN {
26032            payload_buf[0..avail_len].copy_from_slice(__input);
26033            Bytes::new(&payload_buf)
26034        } else {
26035            Bytes::new(__input)
26036        };
26037        let mut __struct = Self::default();
26038        __struct.req_message_rate = buf.get_u16_le();
26039        __struct.target_system = buf.get_u8();
26040        __struct.target_component = buf.get_u8();
26041        __struct.req_stream_id = buf.get_u8();
26042        __struct.start_stop = buf.get_u8();
26043        Ok(__struct)
26044    }
26045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26046        let mut __tmp = BytesMut::new(bytes);
26047        #[allow(clippy::absurd_extreme_comparisons)]
26048        #[allow(unused_comparisons)]
26049        if __tmp.remaining() < Self::ENCODED_LEN {
26050            panic!(
26051                "buffer is too small (need {} bytes, but got {})",
26052                Self::ENCODED_LEN,
26053                __tmp.remaining(),
26054            )
26055        }
26056        __tmp.put_u16_le(self.req_message_rate);
26057        __tmp.put_u8(self.target_system);
26058        __tmp.put_u8(self.target_component);
26059        __tmp.put_u8(self.req_stream_id);
26060        __tmp.put_u8(self.start_stop);
26061        if matches!(version, MavlinkVersion::V2) {
26062            let len = __tmp.len();
26063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26064        } else {
26065            __tmp.len()
26066        }
26067    }
26068}
26069#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
26070#[doc = ""]
26071#[doc = "ID: 412"]
26072#[derive(Debug, Clone, PartialEq)]
26073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26075pub struct REQUEST_EVENT_DATA {
26076    #[doc = "First sequence number of the requested event."]
26077    pub first_sequence: u16,
26078    #[doc = "Last sequence number of the requested event."]
26079    pub last_sequence: u16,
26080    #[doc = "System ID"]
26081    pub target_system: u8,
26082    #[doc = "Component ID"]
26083    pub target_component: u8,
26084}
26085impl REQUEST_EVENT_DATA {
26086    pub const ENCODED_LEN: usize = 6usize;
26087    pub const DEFAULT: Self = Self {
26088        first_sequence: 0_u16,
26089        last_sequence: 0_u16,
26090        target_system: 0_u8,
26091        target_component: 0_u8,
26092    };
26093    #[cfg(feature = "arbitrary")]
26094    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26095        use arbitrary::{Arbitrary, Unstructured};
26096        let mut buf = [0u8; 1024];
26097        rng.fill_bytes(&mut buf);
26098        let mut unstructured = Unstructured::new(&buf);
26099        Self::arbitrary(&mut unstructured).unwrap_or_default()
26100    }
26101}
26102impl Default for REQUEST_EVENT_DATA {
26103    fn default() -> Self {
26104        Self::DEFAULT.clone()
26105    }
26106}
26107impl MessageData for REQUEST_EVENT_DATA {
26108    type Message = MavMessage;
26109    const ID: u32 = 412u32;
26110    const NAME: &'static str = "REQUEST_EVENT";
26111    const EXTRA_CRC: u8 = 33u8;
26112    const ENCODED_LEN: usize = 6usize;
26113    fn deser(
26114        _version: MavlinkVersion,
26115        __input: &[u8],
26116    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26117        let avail_len = __input.len();
26118        let mut payload_buf = [0; Self::ENCODED_LEN];
26119        let mut buf = if avail_len < Self::ENCODED_LEN {
26120            payload_buf[0..avail_len].copy_from_slice(__input);
26121            Bytes::new(&payload_buf)
26122        } else {
26123            Bytes::new(__input)
26124        };
26125        let mut __struct = Self::default();
26126        __struct.first_sequence = buf.get_u16_le();
26127        __struct.last_sequence = buf.get_u16_le();
26128        __struct.target_system = buf.get_u8();
26129        __struct.target_component = buf.get_u8();
26130        Ok(__struct)
26131    }
26132    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26133        let mut __tmp = BytesMut::new(bytes);
26134        #[allow(clippy::absurd_extreme_comparisons)]
26135        #[allow(unused_comparisons)]
26136        if __tmp.remaining() < Self::ENCODED_LEN {
26137            panic!(
26138                "buffer is too small (need {} bytes, but got {})",
26139                Self::ENCODED_LEN,
26140                __tmp.remaining(),
26141            )
26142        }
26143        __tmp.put_u16_le(self.first_sequence);
26144        __tmp.put_u16_le(self.last_sequence);
26145        __tmp.put_u8(self.target_system);
26146        __tmp.put_u8(self.target_component);
26147        if matches!(version, MavlinkVersion::V2) {
26148            let len = __tmp.len();
26149            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26150        } else {
26151            __tmp.len()
26152        }
26153    }
26154}
26155#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
26156#[doc = ""]
26157#[doc = "ID: 142"]
26158#[derive(Debug, Clone, PartialEq)]
26159#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26160#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26161pub struct RESOURCE_REQUEST_DATA {
26162    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
26163    pub request_id: u8,
26164    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
26165    pub uri_type: u8,
26166    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
26167    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26168    pub uri: [u8; 120],
26169    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
26170    pub transfer_type: u8,
26171    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
26172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26173    pub storage: [u8; 120],
26174}
26175impl RESOURCE_REQUEST_DATA {
26176    pub const ENCODED_LEN: usize = 243usize;
26177    pub const DEFAULT: Self = Self {
26178        request_id: 0_u8,
26179        uri_type: 0_u8,
26180        uri: [0_u8; 120usize],
26181        transfer_type: 0_u8,
26182        storage: [0_u8; 120usize],
26183    };
26184    #[cfg(feature = "arbitrary")]
26185    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26186        use arbitrary::{Arbitrary, Unstructured};
26187        let mut buf = [0u8; 1024];
26188        rng.fill_bytes(&mut buf);
26189        let mut unstructured = Unstructured::new(&buf);
26190        Self::arbitrary(&mut unstructured).unwrap_or_default()
26191    }
26192}
26193impl Default for RESOURCE_REQUEST_DATA {
26194    fn default() -> Self {
26195        Self::DEFAULT.clone()
26196    }
26197}
26198impl MessageData for RESOURCE_REQUEST_DATA {
26199    type Message = MavMessage;
26200    const ID: u32 = 142u32;
26201    const NAME: &'static str = "RESOURCE_REQUEST";
26202    const EXTRA_CRC: u8 = 72u8;
26203    const ENCODED_LEN: usize = 243usize;
26204    fn deser(
26205        _version: MavlinkVersion,
26206        __input: &[u8],
26207    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26208        let avail_len = __input.len();
26209        let mut payload_buf = [0; Self::ENCODED_LEN];
26210        let mut buf = if avail_len < Self::ENCODED_LEN {
26211            payload_buf[0..avail_len].copy_from_slice(__input);
26212            Bytes::new(&payload_buf)
26213        } else {
26214            Bytes::new(__input)
26215        };
26216        let mut __struct = Self::default();
26217        __struct.request_id = buf.get_u8();
26218        __struct.uri_type = buf.get_u8();
26219        for v in &mut __struct.uri {
26220            let val = buf.get_u8();
26221            *v = val;
26222        }
26223        __struct.transfer_type = buf.get_u8();
26224        for v in &mut __struct.storage {
26225            let val = buf.get_u8();
26226            *v = val;
26227        }
26228        Ok(__struct)
26229    }
26230    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26231        let mut __tmp = BytesMut::new(bytes);
26232        #[allow(clippy::absurd_extreme_comparisons)]
26233        #[allow(unused_comparisons)]
26234        if __tmp.remaining() < Self::ENCODED_LEN {
26235            panic!(
26236                "buffer is too small (need {} bytes, but got {})",
26237                Self::ENCODED_LEN,
26238                __tmp.remaining(),
26239            )
26240        }
26241        __tmp.put_u8(self.request_id);
26242        __tmp.put_u8(self.uri_type);
26243        for val in &self.uri {
26244            __tmp.put_u8(*val);
26245        }
26246        __tmp.put_u8(self.transfer_type);
26247        for val in &self.storage {
26248            __tmp.put_u8(*val);
26249        }
26250        if matches!(version, MavlinkVersion::V2) {
26251            let len = __tmp.len();
26252            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26253        } else {
26254            __tmp.len()
26255        }
26256    }
26257}
26258#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
26259#[doc = ""]
26260#[doc = "ID: 413"]
26261#[derive(Debug, Clone, PartialEq)]
26262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26264pub struct RESPONSE_EVENT_ERROR_DATA {
26265    #[doc = "Sequence number."]
26266    pub sequence: u16,
26267    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
26268    pub sequence_oldest_available: u16,
26269    #[doc = "System ID"]
26270    pub target_system: u8,
26271    #[doc = "Component ID"]
26272    pub target_component: u8,
26273    #[doc = "Error reason."]
26274    pub reason: MavEventErrorReason,
26275}
26276impl RESPONSE_EVENT_ERROR_DATA {
26277    pub const ENCODED_LEN: usize = 7usize;
26278    pub const DEFAULT: Self = Self {
26279        sequence: 0_u16,
26280        sequence_oldest_available: 0_u16,
26281        target_system: 0_u8,
26282        target_component: 0_u8,
26283        reason: MavEventErrorReason::DEFAULT,
26284    };
26285    #[cfg(feature = "arbitrary")]
26286    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26287        use arbitrary::{Arbitrary, Unstructured};
26288        let mut buf = [0u8; 1024];
26289        rng.fill_bytes(&mut buf);
26290        let mut unstructured = Unstructured::new(&buf);
26291        Self::arbitrary(&mut unstructured).unwrap_or_default()
26292    }
26293}
26294impl Default for RESPONSE_EVENT_ERROR_DATA {
26295    fn default() -> Self {
26296        Self::DEFAULT.clone()
26297    }
26298}
26299impl MessageData for RESPONSE_EVENT_ERROR_DATA {
26300    type Message = MavMessage;
26301    const ID: u32 = 413u32;
26302    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
26303    const EXTRA_CRC: u8 = 77u8;
26304    const ENCODED_LEN: usize = 7usize;
26305    fn deser(
26306        _version: MavlinkVersion,
26307        __input: &[u8],
26308    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26309        let avail_len = __input.len();
26310        let mut payload_buf = [0; Self::ENCODED_LEN];
26311        let mut buf = if avail_len < Self::ENCODED_LEN {
26312            payload_buf[0..avail_len].copy_from_slice(__input);
26313            Bytes::new(&payload_buf)
26314        } else {
26315            Bytes::new(__input)
26316        };
26317        let mut __struct = Self::default();
26318        __struct.sequence = buf.get_u16_le();
26319        __struct.sequence_oldest_available = buf.get_u16_le();
26320        __struct.target_system = buf.get_u8();
26321        __struct.target_component = buf.get_u8();
26322        let tmp = buf.get_u8();
26323        __struct.reason =
26324            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26325                enum_type: "MavEventErrorReason",
26326                value: tmp as u32,
26327            })?;
26328        Ok(__struct)
26329    }
26330    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26331        let mut __tmp = BytesMut::new(bytes);
26332        #[allow(clippy::absurd_extreme_comparisons)]
26333        #[allow(unused_comparisons)]
26334        if __tmp.remaining() < Self::ENCODED_LEN {
26335            panic!(
26336                "buffer is too small (need {} bytes, but got {})",
26337                Self::ENCODED_LEN,
26338                __tmp.remaining(),
26339            )
26340        }
26341        __tmp.put_u16_le(self.sequence);
26342        __tmp.put_u16_le(self.sequence_oldest_available);
26343        __tmp.put_u8(self.target_system);
26344        __tmp.put_u8(self.target_component);
26345        __tmp.put_u8(self.reason as u8);
26346        if matches!(version, MavlinkVersion::V2) {
26347            let len = __tmp.len();
26348            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26349        } else {
26350            __tmp.len()
26351        }
26352    }
26353}
26354#[doc = "Read out the safety zone the MAV currently assumes."]
26355#[doc = ""]
26356#[doc = "ID: 55"]
26357#[derive(Debug, Clone, PartialEq)]
26358#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26360pub struct SAFETY_ALLOWED_AREA_DATA {
26361    #[doc = "x position 1 / Latitude 1"]
26362    pub p1x: f32,
26363    #[doc = "y position 1 / Longitude 1"]
26364    pub p1y: f32,
26365    #[doc = "z position 1 / Altitude 1"]
26366    pub p1z: f32,
26367    #[doc = "x position 2 / Latitude 2"]
26368    pub p2x: f32,
26369    #[doc = "y position 2 / Longitude 2"]
26370    pub p2y: f32,
26371    #[doc = "z position 2 / Altitude 2"]
26372    pub p2z: f32,
26373    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26374    pub frame: MavFrame,
26375}
26376impl SAFETY_ALLOWED_AREA_DATA {
26377    pub const ENCODED_LEN: usize = 25usize;
26378    pub const DEFAULT: Self = Self {
26379        p1x: 0.0_f32,
26380        p1y: 0.0_f32,
26381        p1z: 0.0_f32,
26382        p2x: 0.0_f32,
26383        p2y: 0.0_f32,
26384        p2z: 0.0_f32,
26385        frame: MavFrame::DEFAULT,
26386    };
26387    #[cfg(feature = "arbitrary")]
26388    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26389        use arbitrary::{Arbitrary, Unstructured};
26390        let mut buf = [0u8; 1024];
26391        rng.fill_bytes(&mut buf);
26392        let mut unstructured = Unstructured::new(&buf);
26393        Self::arbitrary(&mut unstructured).unwrap_or_default()
26394    }
26395}
26396impl Default for SAFETY_ALLOWED_AREA_DATA {
26397    fn default() -> Self {
26398        Self::DEFAULT.clone()
26399    }
26400}
26401impl MessageData for SAFETY_ALLOWED_AREA_DATA {
26402    type Message = MavMessage;
26403    const ID: u32 = 55u32;
26404    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
26405    const EXTRA_CRC: u8 = 3u8;
26406    const ENCODED_LEN: usize = 25usize;
26407    fn deser(
26408        _version: MavlinkVersion,
26409        __input: &[u8],
26410    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26411        let avail_len = __input.len();
26412        let mut payload_buf = [0; Self::ENCODED_LEN];
26413        let mut buf = if avail_len < Self::ENCODED_LEN {
26414            payload_buf[0..avail_len].copy_from_slice(__input);
26415            Bytes::new(&payload_buf)
26416        } else {
26417            Bytes::new(__input)
26418        };
26419        let mut __struct = Self::default();
26420        __struct.p1x = buf.get_f32_le();
26421        __struct.p1y = buf.get_f32_le();
26422        __struct.p1z = buf.get_f32_le();
26423        __struct.p2x = buf.get_f32_le();
26424        __struct.p2y = buf.get_f32_le();
26425        __struct.p2z = buf.get_f32_le();
26426        let tmp = buf.get_u8();
26427        __struct.frame =
26428            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26429                enum_type: "MavFrame",
26430                value: tmp as u32,
26431            })?;
26432        Ok(__struct)
26433    }
26434    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26435        let mut __tmp = BytesMut::new(bytes);
26436        #[allow(clippy::absurd_extreme_comparisons)]
26437        #[allow(unused_comparisons)]
26438        if __tmp.remaining() < Self::ENCODED_LEN {
26439            panic!(
26440                "buffer is too small (need {} bytes, but got {})",
26441                Self::ENCODED_LEN,
26442                __tmp.remaining(),
26443            )
26444        }
26445        __tmp.put_f32_le(self.p1x);
26446        __tmp.put_f32_le(self.p1y);
26447        __tmp.put_f32_le(self.p1z);
26448        __tmp.put_f32_le(self.p2x);
26449        __tmp.put_f32_le(self.p2y);
26450        __tmp.put_f32_le(self.p2z);
26451        __tmp.put_u8(self.frame as u8);
26452        if matches!(version, MavlinkVersion::V2) {
26453            let len = __tmp.len();
26454            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26455        } else {
26456            __tmp.len()
26457        }
26458    }
26459}
26460#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
26461#[doc = ""]
26462#[doc = "ID: 54"]
26463#[derive(Debug, Clone, PartialEq)]
26464#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26465#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26466pub struct SAFETY_SET_ALLOWED_AREA_DATA {
26467    #[doc = "x position 1 / Latitude 1"]
26468    pub p1x: f32,
26469    #[doc = "y position 1 / Longitude 1"]
26470    pub p1y: f32,
26471    #[doc = "z position 1 / Altitude 1"]
26472    pub p1z: f32,
26473    #[doc = "x position 2 / Latitude 2"]
26474    pub p2x: f32,
26475    #[doc = "y position 2 / Longitude 2"]
26476    pub p2y: f32,
26477    #[doc = "z position 2 / Altitude 2"]
26478    pub p2z: f32,
26479    #[doc = "System ID"]
26480    pub target_system: u8,
26481    #[doc = "Component ID"]
26482    pub target_component: u8,
26483    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
26484    pub frame: MavFrame,
26485}
26486impl SAFETY_SET_ALLOWED_AREA_DATA {
26487    pub const ENCODED_LEN: usize = 27usize;
26488    pub const DEFAULT: Self = Self {
26489        p1x: 0.0_f32,
26490        p1y: 0.0_f32,
26491        p1z: 0.0_f32,
26492        p2x: 0.0_f32,
26493        p2y: 0.0_f32,
26494        p2z: 0.0_f32,
26495        target_system: 0_u8,
26496        target_component: 0_u8,
26497        frame: MavFrame::DEFAULT,
26498    };
26499    #[cfg(feature = "arbitrary")]
26500    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26501        use arbitrary::{Arbitrary, Unstructured};
26502        let mut buf = [0u8; 1024];
26503        rng.fill_bytes(&mut buf);
26504        let mut unstructured = Unstructured::new(&buf);
26505        Self::arbitrary(&mut unstructured).unwrap_or_default()
26506    }
26507}
26508impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
26509    fn default() -> Self {
26510        Self::DEFAULT.clone()
26511    }
26512}
26513impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
26514    type Message = MavMessage;
26515    const ID: u32 = 54u32;
26516    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
26517    const EXTRA_CRC: u8 = 15u8;
26518    const ENCODED_LEN: usize = 27usize;
26519    fn deser(
26520        _version: MavlinkVersion,
26521        __input: &[u8],
26522    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26523        let avail_len = __input.len();
26524        let mut payload_buf = [0; Self::ENCODED_LEN];
26525        let mut buf = if avail_len < Self::ENCODED_LEN {
26526            payload_buf[0..avail_len].copy_from_slice(__input);
26527            Bytes::new(&payload_buf)
26528        } else {
26529            Bytes::new(__input)
26530        };
26531        let mut __struct = Self::default();
26532        __struct.p1x = buf.get_f32_le();
26533        __struct.p1y = buf.get_f32_le();
26534        __struct.p1z = buf.get_f32_le();
26535        __struct.p2x = buf.get_f32_le();
26536        __struct.p2y = buf.get_f32_le();
26537        __struct.p2z = buf.get_f32_le();
26538        __struct.target_system = buf.get_u8();
26539        __struct.target_component = buf.get_u8();
26540        let tmp = buf.get_u8();
26541        __struct.frame =
26542            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26543                enum_type: "MavFrame",
26544                value: tmp as u32,
26545            })?;
26546        Ok(__struct)
26547    }
26548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26549        let mut __tmp = BytesMut::new(bytes);
26550        #[allow(clippy::absurd_extreme_comparisons)]
26551        #[allow(unused_comparisons)]
26552        if __tmp.remaining() < Self::ENCODED_LEN {
26553            panic!(
26554                "buffer is too small (need {} bytes, but got {})",
26555                Self::ENCODED_LEN,
26556                __tmp.remaining(),
26557            )
26558        }
26559        __tmp.put_f32_le(self.p1x);
26560        __tmp.put_f32_le(self.p1y);
26561        __tmp.put_f32_le(self.p1z);
26562        __tmp.put_f32_le(self.p2x);
26563        __tmp.put_f32_le(self.p2y);
26564        __tmp.put_f32_le(self.p2z);
26565        __tmp.put_u8(self.target_system);
26566        __tmp.put_u8(self.target_component);
26567        __tmp.put_u8(self.frame as u8);
26568        if matches!(version, MavlinkVersion::V2) {
26569            let len = __tmp.len();
26570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26571        } else {
26572            __tmp.len()
26573        }
26574    }
26575}
26576#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
26577#[doc = ""]
26578#[doc = "ID: 26"]
26579#[derive(Debug, Clone, PartialEq)]
26580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26582pub struct SCALED_IMU_DATA {
26583    #[doc = "Timestamp (time since system boot)."]
26584    pub time_boot_ms: u32,
26585    #[doc = "X acceleration"]
26586    pub xacc: i16,
26587    #[doc = "Y acceleration"]
26588    pub yacc: i16,
26589    #[doc = "Z acceleration"]
26590    pub zacc: i16,
26591    #[doc = "Angular speed around X axis"]
26592    pub xgyro: i16,
26593    #[doc = "Angular speed around Y axis"]
26594    pub ygyro: i16,
26595    #[doc = "Angular speed around Z axis"]
26596    pub zgyro: i16,
26597    #[doc = "X Magnetic field"]
26598    pub xmag: i16,
26599    #[doc = "Y Magnetic field"]
26600    pub ymag: i16,
26601    #[doc = "Z Magnetic field"]
26602    pub zmag: i16,
26603    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26604    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26605    pub temperature: i16,
26606}
26607impl SCALED_IMU_DATA {
26608    pub const ENCODED_LEN: usize = 24usize;
26609    pub const DEFAULT: Self = Self {
26610        time_boot_ms: 0_u32,
26611        xacc: 0_i16,
26612        yacc: 0_i16,
26613        zacc: 0_i16,
26614        xgyro: 0_i16,
26615        ygyro: 0_i16,
26616        zgyro: 0_i16,
26617        xmag: 0_i16,
26618        ymag: 0_i16,
26619        zmag: 0_i16,
26620        temperature: 0_i16,
26621    };
26622    #[cfg(feature = "arbitrary")]
26623    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26624        use arbitrary::{Arbitrary, Unstructured};
26625        let mut buf = [0u8; 1024];
26626        rng.fill_bytes(&mut buf);
26627        let mut unstructured = Unstructured::new(&buf);
26628        Self::arbitrary(&mut unstructured).unwrap_or_default()
26629    }
26630}
26631impl Default for SCALED_IMU_DATA {
26632    fn default() -> Self {
26633        Self::DEFAULT.clone()
26634    }
26635}
26636impl MessageData for SCALED_IMU_DATA {
26637    type Message = MavMessage;
26638    const ID: u32 = 26u32;
26639    const NAME: &'static str = "SCALED_IMU";
26640    const EXTRA_CRC: u8 = 170u8;
26641    const ENCODED_LEN: usize = 24usize;
26642    fn deser(
26643        _version: MavlinkVersion,
26644        __input: &[u8],
26645    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26646        let avail_len = __input.len();
26647        let mut payload_buf = [0; Self::ENCODED_LEN];
26648        let mut buf = if avail_len < Self::ENCODED_LEN {
26649            payload_buf[0..avail_len].copy_from_slice(__input);
26650            Bytes::new(&payload_buf)
26651        } else {
26652            Bytes::new(__input)
26653        };
26654        let mut __struct = Self::default();
26655        __struct.time_boot_ms = buf.get_u32_le();
26656        __struct.xacc = buf.get_i16_le();
26657        __struct.yacc = buf.get_i16_le();
26658        __struct.zacc = buf.get_i16_le();
26659        __struct.xgyro = buf.get_i16_le();
26660        __struct.ygyro = buf.get_i16_le();
26661        __struct.zgyro = buf.get_i16_le();
26662        __struct.xmag = buf.get_i16_le();
26663        __struct.ymag = buf.get_i16_le();
26664        __struct.zmag = buf.get_i16_le();
26665        __struct.temperature = buf.get_i16_le();
26666        Ok(__struct)
26667    }
26668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26669        let mut __tmp = BytesMut::new(bytes);
26670        #[allow(clippy::absurd_extreme_comparisons)]
26671        #[allow(unused_comparisons)]
26672        if __tmp.remaining() < Self::ENCODED_LEN {
26673            panic!(
26674                "buffer is too small (need {} bytes, but got {})",
26675                Self::ENCODED_LEN,
26676                __tmp.remaining(),
26677            )
26678        }
26679        __tmp.put_u32_le(self.time_boot_ms);
26680        __tmp.put_i16_le(self.xacc);
26681        __tmp.put_i16_le(self.yacc);
26682        __tmp.put_i16_le(self.zacc);
26683        __tmp.put_i16_le(self.xgyro);
26684        __tmp.put_i16_le(self.ygyro);
26685        __tmp.put_i16_le(self.zgyro);
26686        __tmp.put_i16_le(self.xmag);
26687        __tmp.put_i16_le(self.ymag);
26688        __tmp.put_i16_le(self.zmag);
26689        __tmp.put_i16_le(self.temperature);
26690        if matches!(version, MavlinkVersion::V2) {
26691            let len = __tmp.len();
26692            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26693        } else {
26694            __tmp.len()
26695        }
26696    }
26697}
26698#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
26699#[doc = ""]
26700#[doc = "ID: 116"]
26701#[derive(Debug, Clone, PartialEq)]
26702#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26703#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26704pub struct SCALED_IMU2_DATA {
26705    #[doc = "Timestamp (time since system boot)."]
26706    pub time_boot_ms: u32,
26707    #[doc = "X acceleration"]
26708    pub xacc: i16,
26709    #[doc = "Y acceleration"]
26710    pub yacc: i16,
26711    #[doc = "Z acceleration"]
26712    pub zacc: i16,
26713    #[doc = "Angular speed around X axis"]
26714    pub xgyro: i16,
26715    #[doc = "Angular speed around Y axis"]
26716    pub ygyro: i16,
26717    #[doc = "Angular speed around Z axis"]
26718    pub zgyro: i16,
26719    #[doc = "X Magnetic field"]
26720    pub xmag: i16,
26721    #[doc = "Y Magnetic field"]
26722    pub ymag: i16,
26723    #[doc = "Z Magnetic field"]
26724    pub zmag: i16,
26725    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26726    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26727    pub temperature: i16,
26728}
26729impl SCALED_IMU2_DATA {
26730    pub const ENCODED_LEN: usize = 24usize;
26731    pub const DEFAULT: Self = Self {
26732        time_boot_ms: 0_u32,
26733        xacc: 0_i16,
26734        yacc: 0_i16,
26735        zacc: 0_i16,
26736        xgyro: 0_i16,
26737        ygyro: 0_i16,
26738        zgyro: 0_i16,
26739        xmag: 0_i16,
26740        ymag: 0_i16,
26741        zmag: 0_i16,
26742        temperature: 0_i16,
26743    };
26744    #[cfg(feature = "arbitrary")]
26745    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26746        use arbitrary::{Arbitrary, Unstructured};
26747        let mut buf = [0u8; 1024];
26748        rng.fill_bytes(&mut buf);
26749        let mut unstructured = Unstructured::new(&buf);
26750        Self::arbitrary(&mut unstructured).unwrap_or_default()
26751    }
26752}
26753impl Default for SCALED_IMU2_DATA {
26754    fn default() -> Self {
26755        Self::DEFAULT.clone()
26756    }
26757}
26758impl MessageData for SCALED_IMU2_DATA {
26759    type Message = MavMessage;
26760    const ID: u32 = 116u32;
26761    const NAME: &'static str = "SCALED_IMU2";
26762    const EXTRA_CRC: u8 = 76u8;
26763    const ENCODED_LEN: usize = 24usize;
26764    fn deser(
26765        _version: MavlinkVersion,
26766        __input: &[u8],
26767    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26768        let avail_len = __input.len();
26769        let mut payload_buf = [0; Self::ENCODED_LEN];
26770        let mut buf = if avail_len < Self::ENCODED_LEN {
26771            payload_buf[0..avail_len].copy_from_slice(__input);
26772            Bytes::new(&payload_buf)
26773        } else {
26774            Bytes::new(__input)
26775        };
26776        let mut __struct = Self::default();
26777        __struct.time_boot_ms = buf.get_u32_le();
26778        __struct.xacc = buf.get_i16_le();
26779        __struct.yacc = buf.get_i16_le();
26780        __struct.zacc = buf.get_i16_le();
26781        __struct.xgyro = buf.get_i16_le();
26782        __struct.ygyro = buf.get_i16_le();
26783        __struct.zgyro = buf.get_i16_le();
26784        __struct.xmag = buf.get_i16_le();
26785        __struct.ymag = buf.get_i16_le();
26786        __struct.zmag = buf.get_i16_le();
26787        __struct.temperature = buf.get_i16_le();
26788        Ok(__struct)
26789    }
26790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26791        let mut __tmp = BytesMut::new(bytes);
26792        #[allow(clippy::absurd_extreme_comparisons)]
26793        #[allow(unused_comparisons)]
26794        if __tmp.remaining() < Self::ENCODED_LEN {
26795            panic!(
26796                "buffer is too small (need {} bytes, but got {})",
26797                Self::ENCODED_LEN,
26798                __tmp.remaining(),
26799            )
26800        }
26801        __tmp.put_u32_le(self.time_boot_ms);
26802        __tmp.put_i16_le(self.xacc);
26803        __tmp.put_i16_le(self.yacc);
26804        __tmp.put_i16_le(self.zacc);
26805        __tmp.put_i16_le(self.xgyro);
26806        __tmp.put_i16_le(self.ygyro);
26807        __tmp.put_i16_le(self.zgyro);
26808        __tmp.put_i16_le(self.xmag);
26809        __tmp.put_i16_le(self.ymag);
26810        __tmp.put_i16_le(self.zmag);
26811        __tmp.put_i16_le(self.temperature);
26812        if matches!(version, MavlinkVersion::V2) {
26813            let len = __tmp.len();
26814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26815        } else {
26816            __tmp.len()
26817        }
26818    }
26819}
26820#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26821#[doc = ""]
26822#[doc = "ID: 129"]
26823#[derive(Debug, Clone, PartialEq)]
26824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26826pub struct SCALED_IMU3_DATA {
26827    #[doc = "Timestamp (time since system boot)."]
26828    pub time_boot_ms: u32,
26829    #[doc = "X acceleration"]
26830    pub xacc: i16,
26831    #[doc = "Y acceleration"]
26832    pub yacc: i16,
26833    #[doc = "Z acceleration"]
26834    pub zacc: i16,
26835    #[doc = "Angular speed around X axis"]
26836    pub xgyro: i16,
26837    #[doc = "Angular speed around Y axis"]
26838    pub ygyro: i16,
26839    #[doc = "Angular speed around Z axis"]
26840    pub zgyro: i16,
26841    #[doc = "X Magnetic field"]
26842    pub xmag: i16,
26843    #[doc = "Y Magnetic field"]
26844    pub ymag: i16,
26845    #[doc = "Z Magnetic field"]
26846    pub zmag: i16,
26847    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26848    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26849    pub temperature: i16,
26850}
26851impl SCALED_IMU3_DATA {
26852    pub const ENCODED_LEN: usize = 24usize;
26853    pub const DEFAULT: Self = Self {
26854        time_boot_ms: 0_u32,
26855        xacc: 0_i16,
26856        yacc: 0_i16,
26857        zacc: 0_i16,
26858        xgyro: 0_i16,
26859        ygyro: 0_i16,
26860        zgyro: 0_i16,
26861        xmag: 0_i16,
26862        ymag: 0_i16,
26863        zmag: 0_i16,
26864        temperature: 0_i16,
26865    };
26866    #[cfg(feature = "arbitrary")]
26867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26868        use arbitrary::{Arbitrary, Unstructured};
26869        let mut buf = [0u8; 1024];
26870        rng.fill_bytes(&mut buf);
26871        let mut unstructured = Unstructured::new(&buf);
26872        Self::arbitrary(&mut unstructured).unwrap_or_default()
26873    }
26874}
26875impl Default for SCALED_IMU3_DATA {
26876    fn default() -> Self {
26877        Self::DEFAULT.clone()
26878    }
26879}
26880impl MessageData for SCALED_IMU3_DATA {
26881    type Message = MavMessage;
26882    const ID: u32 = 129u32;
26883    const NAME: &'static str = "SCALED_IMU3";
26884    const EXTRA_CRC: u8 = 46u8;
26885    const ENCODED_LEN: usize = 24usize;
26886    fn deser(
26887        _version: MavlinkVersion,
26888        __input: &[u8],
26889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26890        let avail_len = __input.len();
26891        let mut payload_buf = [0; Self::ENCODED_LEN];
26892        let mut buf = if avail_len < Self::ENCODED_LEN {
26893            payload_buf[0..avail_len].copy_from_slice(__input);
26894            Bytes::new(&payload_buf)
26895        } else {
26896            Bytes::new(__input)
26897        };
26898        let mut __struct = Self::default();
26899        __struct.time_boot_ms = buf.get_u32_le();
26900        __struct.xacc = buf.get_i16_le();
26901        __struct.yacc = buf.get_i16_le();
26902        __struct.zacc = buf.get_i16_le();
26903        __struct.xgyro = buf.get_i16_le();
26904        __struct.ygyro = buf.get_i16_le();
26905        __struct.zgyro = buf.get_i16_le();
26906        __struct.xmag = buf.get_i16_le();
26907        __struct.ymag = buf.get_i16_le();
26908        __struct.zmag = buf.get_i16_le();
26909        __struct.temperature = buf.get_i16_le();
26910        Ok(__struct)
26911    }
26912    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26913        let mut __tmp = BytesMut::new(bytes);
26914        #[allow(clippy::absurd_extreme_comparisons)]
26915        #[allow(unused_comparisons)]
26916        if __tmp.remaining() < Self::ENCODED_LEN {
26917            panic!(
26918                "buffer is too small (need {} bytes, but got {})",
26919                Self::ENCODED_LEN,
26920                __tmp.remaining(),
26921            )
26922        }
26923        __tmp.put_u32_le(self.time_boot_ms);
26924        __tmp.put_i16_le(self.xacc);
26925        __tmp.put_i16_le(self.yacc);
26926        __tmp.put_i16_le(self.zacc);
26927        __tmp.put_i16_le(self.xgyro);
26928        __tmp.put_i16_le(self.ygyro);
26929        __tmp.put_i16_le(self.zgyro);
26930        __tmp.put_i16_le(self.xmag);
26931        __tmp.put_i16_le(self.ymag);
26932        __tmp.put_i16_le(self.zmag);
26933        __tmp.put_i16_le(self.temperature);
26934        if matches!(version, MavlinkVersion::V2) {
26935            let len = __tmp.len();
26936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26937        } else {
26938            __tmp.len()
26939        }
26940    }
26941}
26942#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26943#[doc = ""]
26944#[doc = "ID: 29"]
26945#[derive(Debug, Clone, PartialEq)]
26946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26948pub struct SCALED_PRESSURE_DATA {
26949    #[doc = "Timestamp (time since system boot)."]
26950    pub time_boot_ms: u32,
26951    #[doc = "Absolute pressure"]
26952    pub press_abs: f32,
26953    #[doc = "Differential pressure 1"]
26954    pub press_diff: f32,
26955    #[doc = "Absolute pressure temperature"]
26956    pub temperature: i16,
26957    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26958    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26959    pub temperature_press_diff: i16,
26960}
26961impl SCALED_PRESSURE_DATA {
26962    pub const ENCODED_LEN: usize = 16usize;
26963    pub const DEFAULT: Self = Self {
26964        time_boot_ms: 0_u32,
26965        press_abs: 0.0_f32,
26966        press_diff: 0.0_f32,
26967        temperature: 0_i16,
26968        temperature_press_diff: 0_i16,
26969    };
26970    #[cfg(feature = "arbitrary")]
26971    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26972        use arbitrary::{Arbitrary, Unstructured};
26973        let mut buf = [0u8; 1024];
26974        rng.fill_bytes(&mut buf);
26975        let mut unstructured = Unstructured::new(&buf);
26976        Self::arbitrary(&mut unstructured).unwrap_or_default()
26977    }
26978}
26979impl Default for SCALED_PRESSURE_DATA {
26980    fn default() -> Self {
26981        Self::DEFAULT.clone()
26982    }
26983}
26984impl MessageData for SCALED_PRESSURE_DATA {
26985    type Message = MavMessage;
26986    const ID: u32 = 29u32;
26987    const NAME: &'static str = "SCALED_PRESSURE";
26988    const EXTRA_CRC: u8 = 115u8;
26989    const ENCODED_LEN: usize = 16usize;
26990    fn deser(
26991        _version: MavlinkVersion,
26992        __input: &[u8],
26993    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26994        let avail_len = __input.len();
26995        let mut payload_buf = [0; Self::ENCODED_LEN];
26996        let mut buf = if avail_len < Self::ENCODED_LEN {
26997            payload_buf[0..avail_len].copy_from_slice(__input);
26998            Bytes::new(&payload_buf)
26999        } else {
27000            Bytes::new(__input)
27001        };
27002        let mut __struct = Self::default();
27003        __struct.time_boot_ms = buf.get_u32_le();
27004        __struct.press_abs = buf.get_f32_le();
27005        __struct.press_diff = buf.get_f32_le();
27006        __struct.temperature = buf.get_i16_le();
27007        __struct.temperature_press_diff = buf.get_i16_le();
27008        Ok(__struct)
27009    }
27010    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27011        let mut __tmp = BytesMut::new(bytes);
27012        #[allow(clippy::absurd_extreme_comparisons)]
27013        #[allow(unused_comparisons)]
27014        if __tmp.remaining() < Self::ENCODED_LEN {
27015            panic!(
27016                "buffer is too small (need {} bytes, but got {})",
27017                Self::ENCODED_LEN,
27018                __tmp.remaining(),
27019            )
27020        }
27021        __tmp.put_u32_le(self.time_boot_ms);
27022        __tmp.put_f32_le(self.press_abs);
27023        __tmp.put_f32_le(self.press_diff);
27024        __tmp.put_i16_le(self.temperature);
27025        __tmp.put_i16_le(self.temperature_press_diff);
27026        if matches!(version, MavlinkVersion::V2) {
27027            let len = __tmp.len();
27028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27029        } else {
27030            __tmp.len()
27031        }
27032    }
27033}
27034#[doc = "Barometer readings for 2nd barometer."]
27035#[doc = ""]
27036#[doc = "ID: 137"]
27037#[derive(Debug, Clone, PartialEq)]
27038#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27039#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27040pub struct SCALED_PRESSURE2_DATA {
27041    #[doc = "Timestamp (time since system boot)."]
27042    pub time_boot_ms: u32,
27043    #[doc = "Absolute pressure"]
27044    pub press_abs: f32,
27045    #[doc = "Differential pressure"]
27046    pub press_diff: f32,
27047    #[doc = "Absolute pressure temperature"]
27048    pub temperature: i16,
27049    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27050    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27051    pub temperature_press_diff: i16,
27052}
27053impl SCALED_PRESSURE2_DATA {
27054    pub const ENCODED_LEN: usize = 16usize;
27055    pub const DEFAULT: Self = Self {
27056        time_boot_ms: 0_u32,
27057        press_abs: 0.0_f32,
27058        press_diff: 0.0_f32,
27059        temperature: 0_i16,
27060        temperature_press_diff: 0_i16,
27061    };
27062    #[cfg(feature = "arbitrary")]
27063    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27064        use arbitrary::{Arbitrary, Unstructured};
27065        let mut buf = [0u8; 1024];
27066        rng.fill_bytes(&mut buf);
27067        let mut unstructured = Unstructured::new(&buf);
27068        Self::arbitrary(&mut unstructured).unwrap_or_default()
27069    }
27070}
27071impl Default for SCALED_PRESSURE2_DATA {
27072    fn default() -> Self {
27073        Self::DEFAULT.clone()
27074    }
27075}
27076impl MessageData for SCALED_PRESSURE2_DATA {
27077    type Message = MavMessage;
27078    const ID: u32 = 137u32;
27079    const NAME: &'static str = "SCALED_PRESSURE2";
27080    const EXTRA_CRC: u8 = 195u8;
27081    const ENCODED_LEN: usize = 16usize;
27082    fn deser(
27083        _version: MavlinkVersion,
27084        __input: &[u8],
27085    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27086        let avail_len = __input.len();
27087        let mut payload_buf = [0; Self::ENCODED_LEN];
27088        let mut buf = if avail_len < Self::ENCODED_LEN {
27089            payload_buf[0..avail_len].copy_from_slice(__input);
27090            Bytes::new(&payload_buf)
27091        } else {
27092            Bytes::new(__input)
27093        };
27094        let mut __struct = Self::default();
27095        __struct.time_boot_ms = buf.get_u32_le();
27096        __struct.press_abs = buf.get_f32_le();
27097        __struct.press_diff = buf.get_f32_le();
27098        __struct.temperature = buf.get_i16_le();
27099        __struct.temperature_press_diff = buf.get_i16_le();
27100        Ok(__struct)
27101    }
27102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27103        let mut __tmp = BytesMut::new(bytes);
27104        #[allow(clippy::absurd_extreme_comparisons)]
27105        #[allow(unused_comparisons)]
27106        if __tmp.remaining() < Self::ENCODED_LEN {
27107            panic!(
27108                "buffer is too small (need {} bytes, but got {})",
27109                Self::ENCODED_LEN,
27110                __tmp.remaining(),
27111            )
27112        }
27113        __tmp.put_u32_le(self.time_boot_ms);
27114        __tmp.put_f32_le(self.press_abs);
27115        __tmp.put_f32_le(self.press_diff);
27116        __tmp.put_i16_le(self.temperature);
27117        __tmp.put_i16_le(self.temperature_press_diff);
27118        if matches!(version, MavlinkVersion::V2) {
27119            let len = __tmp.len();
27120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27121        } else {
27122            __tmp.len()
27123        }
27124    }
27125}
27126#[doc = "Barometer readings for 3rd barometer."]
27127#[doc = ""]
27128#[doc = "ID: 143"]
27129#[derive(Debug, Clone, PartialEq)]
27130#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27131#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27132pub struct SCALED_PRESSURE3_DATA {
27133    #[doc = "Timestamp (time since system boot)."]
27134    pub time_boot_ms: u32,
27135    #[doc = "Absolute pressure"]
27136    pub press_abs: f32,
27137    #[doc = "Differential pressure"]
27138    pub press_diff: f32,
27139    #[doc = "Absolute pressure temperature"]
27140    pub temperature: i16,
27141    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
27142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27143    pub temperature_press_diff: i16,
27144}
27145impl SCALED_PRESSURE3_DATA {
27146    pub const ENCODED_LEN: usize = 16usize;
27147    pub const DEFAULT: Self = Self {
27148        time_boot_ms: 0_u32,
27149        press_abs: 0.0_f32,
27150        press_diff: 0.0_f32,
27151        temperature: 0_i16,
27152        temperature_press_diff: 0_i16,
27153    };
27154    #[cfg(feature = "arbitrary")]
27155    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27156        use arbitrary::{Arbitrary, Unstructured};
27157        let mut buf = [0u8; 1024];
27158        rng.fill_bytes(&mut buf);
27159        let mut unstructured = Unstructured::new(&buf);
27160        Self::arbitrary(&mut unstructured).unwrap_or_default()
27161    }
27162}
27163impl Default for SCALED_PRESSURE3_DATA {
27164    fn default() -> Self {
27165        Self::DEFAULT.clone()
27166    }
27167}
27168impl MessageData for SCALED_PRESSURE3_DATA {
27169    type Message = MavMessage;
27170    const ID: u32 = 143u32;
27171    const NAME: &'static str = "SCALED_PRESSURE3";
27172    const EXTRA_CRC: u8 = 131u8;
27173    const ENCODED_LEN: usize = 16usize;
27174    fn deser(
27175        _version: MavlinkVersion,
27176        __input: &[u8],
27177    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27178        let avail_len = __input.len();
27179        let mut payload_buf = [0; Self::ENCODED_LEN];
27180        let mut buf = if avail_len < Self::ENCODED_LEN {
27181            payload_buf[0..avail_len].copy_from_slice(__input);
27182            Bytes::new(&payload_buf)
27183        } else {
27184            Bytes::new(__input)
27185        };
27186        let mut __struct = Self::default();
27187        __struct.time_boot_ms = buf.get_u32_le();
27188        __struct.press_abs = buf.get_f32_le();
27189        __struct.press_diff = buf.get_f32_le();
27190        __struct.temperature = buf.get_i16_le();
27191        __struct.temperature_press_diff = buf.get_i16_le();
27192        Ok(__struct)
27193    }
27194    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27195        let mut __tmp = BytesMut::new(bytes);
27196        #[allow(clippy::absurd_extreme_comparisons)]
27197        #[allow(unused_comparisons)]
27198        if __tmp.remaining() < Self::ENCODED_LEN {
27199            panic!(
27200                "buffer is too small (need {} bytes, but got {})",
27201                Self::ENCODED_LEN,
27202                __tmp.remaining(),
27203            )
27204        }
27205        __tmp.put_u32_le(self.time_boot_ms);
27206        __tmp.put_f32_le(self.press_abs);
27207        __tmp.put_f32_le(self.press_diff);
27208        __tmp.put_i16_le(self.temperature);
27209        __tmp.put_i16_le(self.temperature_press_diff);
27210        if matches!(version, MavlinkVersion::V2) {
27211            let len = __tmp.len();
27212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27213        } else {
27214            __tmp.len()
27215        }
27216    }
27217}
27218#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
27219#[doc = ""]
27220#[doc = "ID: 126"]
27221#[derive(Debug, Clone, PartialEq)]
27222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27224pub struct SERIAL_CONTROL_DATA {
27225    #[doc = "Baudrate of transfer. Zero means no change."]
27226    pub baudrate: u32,
27227    #[doc = "Timeout for reply data"]
27228    pub timeout: u16,
27229    #[doc = "Serial control device type."]
27230    pub device: SerialControlDev,
27231    #[doc = "Bitmap of serial control flags."]
27232    pub flags: SerialControlFlag,
27233    #[doc = "how many bytes in this transfer"]
27234    pub count: u8,
27235    #[doc = "serial data"]
27236    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27237    pub data: [u8; 70],
27238    #[doc = "System ID"]
27239    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27240    pub target_system: u8,
27241    #[doc = "Component ID"]
27242    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27243    pub target_component: u8,
27244}
27245impl SERIAL_CONTROL_DATA {
27246    pub const ENCODED_LEN: usize = 81usize;
27247    pub const DEFAULT: Self = Self {
27248        baudrate: 0_u32,
27249        timeout: 0_u16,
27250        device: SerialControlDev::DEFAULT,
27251        flags: SerialControlFlag::DEFAULT,
27252        count: 0_u8,
27253        data: [0_u8; 70usize],
27254        target_system: 0_u8,
27255        target_component: 0_u8,
27256    };
27257    #[cfg(feature = "arbitrary")]
27258    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27259        use arbitrary::{Arbitrary, Unstructured};
27260        let mut buf = [0u8; 1024];
27261        rng.fill_bytes(&mut buf);
27262        let mut unstructured = Unstructured::new(&buf);
27263        Self::arbitrary(&mut unstructured).unwrap_or_default()
27264    }
27265}
27266impl Default for SERIAL_CONTROL_DATA {
27267    fn default() -> Self {
27268        Self::DEFAULT.clone()
27269    }
27270}
27271impl MessageData for SERIAL_CONTROL_DATA {
27272    type Message = MavMessage;
27273    const ID: u32 = 126u32;
27274    const NAME: &'static str = "SERIAL_CONTROL";
27275    const EXTRA_CRC: u8 = 220u8;
27276    const ENCODED_LEN: usize = 81usize;
27277    fn deser(
27278        _version: MavlinkVersion,
27279        __input: &[u8],
27280    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27281        let avail_len = __input.len();
27282        let mut payload_buf = [0; Self::ENCODED_LEN];
27283        let mut buf = if avail_len < Self::ENCODED_LEN {
27284            payload_buf[0..avail_len].copy_from_slice(__input);
27285            Bytes::new(&payload_buf)
27286        } else {
27287            Bytes::new(__input)
27288        };
27289        let mut __struct = Self::default();
27290        __struct.baudrate = buf.get_u32_le();
27291        __struct.timeout = buf.get_u16_le();
27292        let tmp = buf.get_u8();
27293        __struct.device =
27294            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27295                enum_type: "SerialControlDev",
27296                value: tmp as u32,
27297            })?;
27298        let tmp = buf.get_u8();
27299        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
27300            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27301                flag_type: "SerialControlFlag",
27302                value: tmp as u32,
27303            })?;
27304        __struct.count = buf.get_u8();
27305        for v in &mut __struct.data {
27306            let val = buf.get_u8();
27307            *v = val;
27308        }
27309        __struct.target_system = buf.get_u8();
27310        __struct.target_component = buf.get_u8();
27311        Ok(__struct)
27312    }
27313    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27314        let mut __tmp = BytesMut::new(bytes);
27315        #[allow(clippy::absurd_extreme_comparisons)]
27316        #[allow(unused_comparisons)]
27317        if __tmp.remaining() < Self::ENCODED_LEN {
27318            panic!(
27319                "buffer is too small (need {} bytes, but got {})",
27320                Self::ENCODED_LEN,
27321                __tmp.remaining(),
27322            )
27323        }
27324        __tmp.put_u32_le(self.baudrate);
27325        __tmp.put_u16_le(self.timeout);
27326        __tmp.put_u8(self.device as u8);
27327        __tmp.put_u8(self.flags.bits());
27328        __tmp.put_u8(self.count);
27329        for val in &self.data {
27330            __tmp.put_u8(*val);
27331        }
27332        __tmp.put_u8(self.target_system);
27333        __tmp.put_u8(self.target_component);
27334        if matches!(version, MavlinkVersion::V2) {
27335            let len = __tmp.len();
27336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27337        } else {
27338            __tmp.len()
27339        }
27340    }
27341}
27342#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F13: format."]
27343#[doc = ""]
27344#[doc = "ID: 177"]
27345#[derive(Debug, Clone, PartialEq)]
27346#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27347#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27348pub struct SERIAL_UDB_EXTRA_F13_DATA {
27349    #[doc = "Serial UDB Extra MP Origin Latitude"]
27350    pub sue_lat_origin: i32,
27351    #[doc = "Serial UDB Extra MP Origin Longitude"]
27352    pub sue_lon_origin: i32,
27353    #[doc = "Serial UDB Extra MP Origin Altitude Above Sea Level"]
27354    pub sue_alt_origin: i32,
27355    #[doc = "Serial UDB Extra GPS Week Number"]
27356    pub sue_week_no: i16,
27357}
27358impl SERIAL_UDB_EXTRA_F13_DATA {
27359    pub const ENCODED_LEN: usize = 14usize;
27360    pub const DEFAULT: Self = Self {
27361        sue_lat_origin: 0_i32,
27362        sue_lon_origin: 0_i32,
27363        sue_alt_origin: 0_i32,
27364        sue_week_no: 0_i16,
27365    };
27366    #[cfg(feature = "arbitrary")]
27367    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27368        use arbitrary::{Arbitrary, Unstructured};
27369        let mut buf = [0u8; 1024];
27370        rng.fill_bytes(&mut buf);
27371        let mut unstructured = Unstructured::new(&buf);
27372        Self::arbitrary(&mut unstructured).unwrap_or_default()
27373    }
27374}
27375impl Default for SERIAL_UDB_EXTRA_F13_DATA {
27376    fn default() -> Self {
27377        Self::DEFAULT.clone()
27378    }
27379}
27380impl MessageData for SERIAL_UDB_EXTRA_F13_DATA {
27381    type Message = MavMessage;
27382    const ID: u32 = 177u32;
27383    const NAME: &'static str = "SERIAL_UDB_EXTRA_F13";
27384    const EXTRA_CRC: u8 = 249u8;
27385    const ENCODED_LEN: usize = 14usize;
27386    fn deser(
27387        _version: MavlinkVersion,
27388        __input: &[u8],
27389    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27390        let avail_len = __input.len();
27391        let mut payload_buf = [0; Self::ENCODED_LEN];
27392        let mut buf = if avail_len < Self::ENCODED_LEN {
27393            payload_buf[0..avail_len].copy_from_slice(__input);
27394            Bytes::new(&payload_buf)
27395        } else {
27396            Bytes::new(__input)
27397        };
27398        let mut __struct = Self::default();
27399        __struct.sue_lat_origin = buf.get_i32_le();
27400        __struct.sue_lon_origin = buf.get_i32_le();
27401        __struct.sue_alt_origin = buf.get_i32_le();
27402        __struct.sue_week_no = buf.get_i16_le();
27403        Ok(__struct)
27404    }
27405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27406        let mut __tmp = BytesMut::new(bytes);
27407        #[allow(clippy::absurd_extreme_comparisons)]
27408        #[allow(unused_comparisons)]
27409        if __tmp.remaining() < Self::ENCODED_LEN {
27410            panic!(
27411                "buffer is too small (need {} bytes, but got {})",
27412                Self::ENCODED_LEN,
27413                __tmp.remaining(),
27414            )
27415        }
27416        __tmp.put_i32_le(self.sue_lat_origin);
27417        __tmp.put_i32_le(self.sue_lon_origin);
27418        __tmp.put_i32_le(self.sue_alt_origin);
27419        __tmp.put_i16_le(self.sue_week_no);
27420        if matches!(version, MavlinkVersion::V2) {
27421            let len = __tmp.len();
27422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27423        } else {
27424            __tmp.len()
27425        }
27426    }
27427}
27428#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F14: format."]
27429#[doc = ""]
27430#[doc = "ID: 178"]
27431#[derive(Debug, Clone, PartialEq)]
27432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27433#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27434pub struct SERIAL_UDB_EXTRA_F14_DATA {
27435    #[doc = "Serial UDB Extra Type Program Address of Last Trap"]
27436    pub sue_TRAP_SOURCE: u32,
27437    #[doc = "Serial UDB Extra Reboot Register of DSPIC"]
27438    pub sue_RCON: i16,
27439    #[doc = "Serial UDB Extra  Last dspic Trap Flags"]
27440    pub sue_TRAP_FLAGS: i16,
27441    #[doc = "Serial UDB Extra Number of Ocillator Failures"]
27442    pub sue_osc_fail_count: i16,
27443    #[doc = "Serial UDB Extra Wind Estimation Enabled"]
27444    pub sue_WIND_ESTIMATION: u8,
27445    #[doc = "Serial UDB Extra Type of GPS Unit"]
27446    pub sue_GPS_TYPE: u8,
27447    #[doc = "Serial UDB Extra Dead Reckoning Enabled"]
27448    pub sue_DR: u8,
27449    #[doc = "Serial UDB Extra Type of UDB Hardware"]
27450    pub sue_BOARD_TYPE: u8,
27451    #[doc = "Serial UDB Extra Type of Airframe"]
27452    pub sue_AIRFRAME: u8,
27453    #[doc = "Serial UDB Extra UDB Internal Clock Configuration"]
27454    pub sue_CLOCK_CONFIG: u8,
27455    #[doc = "Serial UDB Extra Type of Flight Plan"]
27456    pub sue_FLIGHT_PLAN_TYPE: u8,
27457}
27458impl SERIAL_UDB_EXTRA_F14_DATA {
27459    pub const ENCODED_LEN: usize = 17usize;
27460    pub const DEFAULT: Self = Self {
27461        sue_TRAP_SOURCE: 0_u32,
27462        sue_RCON: 0_i16,
27463        sue_TRAP_FLAGS: 0_i16,
27464        sue_osc_fail_count: 0_i16,
27465        sue_WIND_ESTIMATION: 0_u8,
27466        sue_GPS_TYPE: 0_u8,
27467        sue_DR: 0_u8,
27468        sue_BOARD_TYPE: 0_u8,
27469        sue_AIRFRAME: 0_u8,
27470        sue_CLOCK_CONFIG: 0_u8,
27471        sue_FLIGHT_PLAN_TYPE: 0_u8,
27472    };
27473    #[cfg(feature = "arbitrary")]
27474    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27475        use arbitrary::{Arbitrary, Unstructured};
27476        let mut buf = [0u8; 1024];
27477        rng.fill_bytes(&mut buf);
27478        let mut unstructured = Unstructured::new(&buf);
27479        Self::arbitrary(&mut unstructured).unwrap_or_default()
27480    }
27481}
27482impl Default for SERIAL_UDB_EXTRA_F14_DATA {
27483    fn default() -> Self {
27484        Self::DEFAULT.clone()
27485    }
27486}
27487impl MessageData for SERIAL_UDB_EXTRA_F14_DATA {
27488    type Message = MavMessage;
27489    const ID: u32 = 178u32;
27490    const NAME: &'static str = "SERIAL_UDB_EXTRA_F14";
27491    const EXTRA_CRC: u8 = 123u8;
27492    const ENCODED_LEN: usize = 17usize;
27493    fn deser(
27494        _version: MavlinkVersion,
27495        __input: &[u8],
27496    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27497        let avail_len = __input.len();
27498        let mut payload_buf = [0; Self::ENCODED_LEN];
27499        let mut buf = if avail_len < Self::ENCODED_LEN {
27500            payload_buf[0..avail_len].copy_from_slice(__input);
27501            Bytes::new(&payload_buf)
27502        } else {
27503            Bytes::new(__input)
27504        };
27505        let mut __struct = Self::default();
27506        __struct.sue_TRAP_SOURCE = buf.get_u32_le();
27507        __struct.sue_RCON = buf.get_i16_le();
27508        __struct.sue_TRAP_FLAGS = buf.get_i16_le();
27509        __struct.sue_osc_fail_count = buf.get_i16_le();
27510        __struct.sue_WIND_ESTIMATION = buf.get_u8();
27511        __struct.sue_GPS_TYPE = buf.get_u8();
27512        __struct.sue_DR = buf.get_u8();
27513        __struct.sue_BOARD_TYPE = buf.get_u8();
27514        __struct.sue_AIRFRAME = buf.get_u8();
27515        __struct.sue_CLOCK_CONFIG = buf.get_u8();
27516        __struct.sue_FLIGHT_PLAN_TYPE = buf.get_u8();
27517        Ok(__struct)
27518    }
27519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27520        let mut __tmp = BytesMut::new(bytes);
27521        #[allow(clippy::absurd_extreme_comparisons)]
27522        #[allow(unused_comparisons)]
27523        if __tmp.remaining() < Self::ENCODED_LEN {
27524            panic!(
27525                "buffer is too small (need {} bytes, but got {})",
27526                Self::ENCODED_LEN,
27527                __tmp.remaining(),
27528            )
27529        }
27530        __tmp.put_u32_le(self.sue_TRAP_SOURCE);
27531        __tmp.put_i16_le(self.sue_RCON);
27532        __tmp.put_i16_le(self.sue_TRAP_FLAGS);
27533        __tmp.put_i16_le(self.sue_osc_fail_count);
27534        __tmp.put_u8(self.sue_WIND_ESTIMATION);
27535        __tmp.put_u8(self.sue_GPS_TYPE);
27536        __tmp.put_u8(self.sue_DR);
27537        __tmp.put_u8(self.sue_BOARD_TYPE);
27538        __tmp.put_u8(self.sue_AIRFRAME);
27539        __tmp.put_u8(self.sue_CLOCK_CONFIG);
27540        __tmp.put_u8(self.sue_FLIGHT_PLAN_TYPE);
27541        if matches!(version, MavlinkVersion::V2) {
27542            let len = __tmp.len();
27543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27544        } else {
27545            __tmp.len()
27546        }
27547    }
27548}
27549#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F15 format."]
27550#[doc = ""]
27551#[doc = "ID: 179"]
27552#[derive(Debug, Clone, PartialEq)]
27553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27555pub struct SERIAL_UDB_EXTRA_F15_DATA {
27556    #[doc = "Serial UDB Extra Model Name Of Vehicle"]
27557    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27558    pub sue_ID_VEHICLE_MODEL_NAME: [u8; 40],
27559    #[doc = "Serial UDB Extra Registraton Number of Vehicle"]
27560    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27561    pub sue_ID_VEHICLE_REGISTRATION: [u8; 20],
27562}
27563impl SERIAL_UDB_EXTRA_F15_DATA {
27564    pub const ENCODED_LEN: usize = 60usize;
27565    pub const DEFAULT: Self = Self {
27566        sue_ID_VEHICLE_MODEL_NAME: [0_u8; 40usize],
27567        sue_ID_VEHICLE_REGISTRATION: [0_u8; 20usize],
27568    };
27569    #[cfg(feature = "arbitrary")]
27570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27571        use arbitrary::{Arbitrary, Unstructured};
27572        let mut buf = [0u8; 1024];
27573        rng.fill_bytes(&mut buf);
27574        let mut unstructured = Unstructured::new(&buf);
27575        Self::arbitrary(&mut unstructured).unwrap_or_default()
27576    }
27577}
27578impl Default for SERIAL_UDB_EXTRA_F15_DATA {
27579    fn default() -> Self {
27580        Self::DEFAULT.clone()
27581    }
27582}
27583impl MessageData for SERIAL_UDB_EXTRA_F15_DATA {
27584    type Message = MavMessage;
27585    const ID: u32 = 179u32;
27586    const NAME: &'static str = "SERIAL_UDB_EXTRA_F15";
27587    const EXTRA_CRC: u8 = 7u8;
27588    const ENCODED_LEN: usize = 60usize;
27589    fn deser(
27590        _version: MavlinkVersion,
27591        __input: &[u8],
27592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27593        let avail_len = __input.len();
27594        let mut payload_buf = [0; Self::ENCODED_LEN];
27595        let mut buf = if avail_len < Self::ENCODED_LEN {
27596            payload_buf[0..avail_len].copy_from_slice(__input);
27597            Bytes::new(&payload_buf)
27598        } else {
27599            Bytes::new(__input)
27600        };
27601        let mut __struct = Self::default();
27602        for v in &mut __struct.sue_ID_VEHICLE_MODEL_NAME {
27603            let val = buf.get_u8();
27604            *v = val;
27605        }
27606        for v in &mut __struct.sue_ID_VEHICLE_REGISTRATION {
27607            let val = buf.get_u8();
27608            *v = val;
27609        }
27610        Ok(__struct)
27611    }
27612    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27613        let mut __tmp = BytesMut::new(bytes);
27614        #[allow(clippy::absurd_extreme_comparisons)]
27615        #[allow(unused_comparisons)]
27616        if __tmp.remaining() < Self::ENCODED_LEN {
27617            panic!(
27618                "buffer is too small (need {} bytes, but got {})",
27619                Self::ENCODED_LEN,
27620                __tmp.remaining(),
27621            )
27622        }
27623        for val in &self.sue_ID_VEHICLE_MODEL_NAME {
27624            __tmp.put_u8(*val);
27625        }
27626        for val in &self.sue_ID_VEHICLE_REGISTRATION {
27627            __tmp.put_u8(*val);
27628        }
27629        if matches!(version, MavlinkVersion::V2) {
27630            let len = __tmp.len();
27631            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27632        } else {
27633            __tmp.len()
27634        }
27635    }
27636}
27637#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F16 format."]
27638#[doc = ""]
27639#[doc = "ID: 180"]
27640#[derive(Debug, Clone, PartialEq)]
27641#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27643pub struct SERIAL_UDB_EXTRA_F16_DATA {
27644    #[doc = "Serial UDB Extra Name of Expected Lead Pilot"]
27645    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27646    pub sue_ID_LEAD_PILOT: [u8; 40],
27647    #[doc = "Serial UDB Extra URL of Lead Pilot or Team"]
27648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27649    pub sue_ID_DIY_DRONES_URL: [u8; 70],
27650}
27651impl SERIAL_UDB_EXTRA_F16_DATA {
27652    pub const ENCODED_LEN: usize = 110usize;
27653    pub const DEFAULT: Self = Self {
27654        sue_ID_LEAD_PILOT: [0_u8; 40usize],
27655        sue_ID_DIY_DRONES_URL: [0_u8; 70usize],
27656    };
27657    #[cfg(feature = "arbitrary")]
27658    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27659        use arbitrary::{Arbitrary, Unstructured};
27660        let mut buf = [0u8; 1024];
27661        rng.fill_bytes(&mut buf);
27662        let mut unstructured = Unstructured::new(&buf);
27663        Self::arbitrary(&mut unstructured).unwrap_or_default()
27664    }
27665}
27666impl Default for SERIAL_UDB_EXTRA_F16_DATA {
27667    fn default() -> Self {
27668        Self::DEFAULT.clone()
27669    }
27670}
27671impl MessageData for SERIAL_UDB_EXTRA_F16_DATA {
27672    type Message = MavMessage;
27673    const ID: u32 = 180u32;
27674    const NAME: &'static str = "SERIAL_UDB_EXTRA_F16";
27675    const EXTRA_CRC: u8 = 222u8;
27676    const ENCODED_LEN: usize = 110usize;
27677    fn deser(
27678        _version: MavlinkVersion,
27679        __input: &[u8],
27680    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27681        let avail_len = __input.len();
27682        let mut payload_buf = [0; Self::ENCODED_LEN];
27683        let mut buf = if avail_len < Self::ENCODED_LEN {
27684            payload_buf[0..avail_len].copy_from_slice(__input);
27685            Bytes::new(&payload_buf)
27686        } else {
27687            Bytes::new(__input)
27688        };
27689        let mut __struct = Self::default();
27690        for v in &mut __struct.sue_ID_LEAD_PILOT {
27691            let val = buf.get_u8();
27692            *v = val;
27693        }
27694        for v in &mut __struct.sue_ID_DIY_DRONES_URL {
27695            let val = buf.get_u8();
27696            *v = val;
27697        }
27698        Ok(__struct)
27699    }
27700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27701        let mut __tmp = BytesMut::new(bytes);
27702        #[allow(clippy::absurd_extreme_comparisons)]
27703        #[allow(unused_comparisons)]
27704        if __tmp.remaining() < Self::ENCODED_LEN {
27705            panic!(
27706                "buffer is too small (need {} bytes, but got {})",
27707                Self::ENCODED_LEN,
27708                __tmp.remaining(),
27709            )
27710        }
27711        for val in &self.sue_ID_LEAD_PILOT {
27712            __tmp.put_u8(*val);
27713        }
27714        for val in &self.sue_ID_DIY_DRONES_URL {
27715            __tmp.put_u8(*val);
27716        }
27717        if matches!(version, MavlinkVersion::V2) {
27718            let len = __tmp.len();
27719            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27720        } else {
27721            __tmp.len()
27722        }
27723    }
27724}
27725#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F17 format."]
27726#[doc = ""]
27727#[doc = "ID: 183"]
27728#[derive(Debug, Clone, PartialEq)]
27729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27731pub struct SERIAL_UDB_EXTRA_F17_DATA {
27732    #[doc = "SUE Feed Forward Gain"]
27733    pub sue_feed_forward: f32,
27734    #[doc = "SUE Max Turn Rate when Navigating"]
27735    pub sue_turn_rate_nav: f32,
27736    #[doc = "SUE Max Turn Rate in Fly By Wire Mode"]
27737    pub sue_turn_rate_fbw: f32,
27738}
27739impl SERIAL_UDB_EXTRA_F17_DATA {
27740    pub const ENCODED_LEN: usize = 12usize;
27741    pub const DEFAULT: Self = Self {
27742        sue_feed_forward: 0.0_f32,
27743        sue_turn_rate_nav: 0.0_f32,
27744        sue_turn_rate_fbw: 0.0_f32,
27745    };
27746    #[cfg(feature = "arbitrary")]
27747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27748        use arbitrary::{Arbitrary, Unstructured};
27749        let mut buf = [0u8; 1024];
27750        rng.fill_bytes(&mut buf);
27751        let mut unstructured = Unstructured::new(&buf);
27752        Self::arbitrary(&mut unstructured).unwrap_or_default()
27753    }
27754}
27755impl Default for SERIAL_UDB_EXTRA_F17_DATA {
27756    fn default() -> Self {
27757        Self::DEFAULT.clone()
27758    }
27759}
27760impl MessageData for SERIAL_UDB_EXTRA_F17_DATA {
27761    type Message = MavMessage;
27762    const ID: u32 = 183u32;
27763    const NAME: &'static str = "SERIAL_UDB_EXTRA_F17";
27764    const EXTRA_CRC: u8 = 175u8;
27765    const ENCODED_LEN: usize = 12usize;
27766    fn deser(
27767        _version: MavlinkVersion,
27768        __input: &[u8],
27769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27770        let avail_len = __input.len();
27771        let mut payload_buf = [0; Self::ENCODED_LEN];
27772        let mut buf = if avail_len < Self::ENCODED_LEN {
27773            payload_buf[0..avail_len].copy_from_slice(__input);
27774            Bytes::new(&payload_buf)
27775        } else {
27776            Bytes::new(__input)
27777        };
27778        let mut __struct = Self::default();
27779        __struct.sue_feed_forward = buf.get_f32_le();
27780        __struct.sue_turn_rate_nav = buf.get_f32_le();
27781        __struct.sue_turn_rate_fbw = buf.get_f32_le();
27782        Ok(__struct)
27783    }
27784    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27785        let mut __tmp = BytesMut::new(bytes);
27786        #[allow(clippy::absurd_extreme_comparisons)]
27787        #[allow(unused_comparisons)]
27788        if __tmp.remaining() < Self::ENCODED_LEN {
27789            panic!(
27790                "buffer is too small (need {} bytes, but got {})",
27791                Self::ENCODED_LEN,
27792                __tmp.remaining(),
27793            )
27794        }
27795        __tmp.put_f32_le(self.sue_feed_forward);
27796        __tmp.put_f32_le(self.sue_turn_rate_nav);
27797        __tmp.put_f32_le(self.sue_turn_rate_fbw);
27798        if matches!(version, MavlinkVersion::V2) {
27799            let len = __tmp.len();
27800            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27801        } else {
27802            __tmp.len()
27803        }
27804    }
27805}
27806#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F18 format."]
27807#[doc = ""]
27808#[doc = "ID: 184"]
27809#[derive(Debug, Clone, PartialEq)]
27810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27812pub struct SERIAL_UDB_EXTRA_F18_DATA {
27813    #[doc = "SUE Angle of Attack Normal"]
27814    pub angle_of_attack_normal: f32,
27815    #[doc = "SUE Angle of Attack Inverted"]
27816    pub angle_of_attack_inverted: f32,
27817    #[doc = "SUE Elevator Trim Normal"]
27818    pub elevator_trim_normal: f32,
27819    #[doc = "SUE Elevator Trim Inverted"]
27820    pub elevator_trim_inverted: f32,
27821    #[doc = "SUE reference_speed"]
27822    pub reference_speed: f32,
27823}
27824impl SERIAL_UDB_EXTRA_F18_DATA {
27825    pub const ENCODED_LEN: usize = 20usize;
27826    pub const DEFAULT: Self = Self {
27827        angle_of_attack_normal: 0.0_f32,
27828        angle_of_attack_inverted: 0.0_f32,
27829        elevator_trim_normal: 0.0_f32,
27830        elevator_trim_inverted: 0.0_f32,
27831        reference_speed: 0.0_f32,
27832    };
27833    #[cfg(feature = "arbitrary")]
27834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27835        use arbitrary::{Arbitrary, Unstructured};
27836        let mut buf = [0u8; 1024];
27837        rng.fill_bytes(&mut buf);
27838        let mut unstructured = Unstructured::new(&buf);
27839        Self::arbitrary(&mut unstructured).unwrap_or_default()
27840    }
27841}
27842impl Default for SERIAL_UDB_EXTRA_F18_DATA {
27843    fn default() -> Self {
27844        Self::DEFAULT.clone()
27845    }
27846}
27847impl MessageData for SERIAL_UDB_EXTRA_F18_DATA {
27848    type Message = MavMessage;
27849    const ID: u32 = 184u32;
27850    const NAME: &'static str = "SERIAL_UDB_EXTRA_F18";
27851    const EXTRA_CRC: u8 = 41u8;
27852    const ENCODED_LEN: usize = 20usize;
27853    fn deser(
27854        _version: MavlinkVersion,
27855        __input: &[u8],
27856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27857        let avail_len = __input.len();
27858        let mut payload_buf = [0; Self::ENCODED_LEN];
27859        let mut buf = if avail_len < Self::ENCODED_LEN {
27860            payload_buf[0..avail_len].copy_from_slice(__input);
27861            Bytes::new(&payload_buf)
27862        } else {
27863            Bytes::new(__input)
27864        };
27865        let mut __struct = Self::default();
27866        __struct.angle_of_attack_normal = buf.get_f32_le();
27867        __struct.angle_of_attack_inverted = buf.get_f32_le();
27868        __struct.elevator_trim_normal = buf.get_f32_le();
27869        __struct.elevator_trim_inverted = buf.get_f32_le();
27870        __struct.reference_speed = buf.get_f32_le();
27871        Ok(__struct)
27872    }
27873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27874        let mut __tmp = BytesMut::new(bytes);
27875        #[allow(clippy::absurd_extreme_comparisons)]
27876        #[allow(unused_comparisons)]
27877        if __tmp.remaining() < Self::ENCODED_LEN {
27878            panic!(
27879                "buffer is too small (need {} bytes, but got {})",
27880                Self::ENCODED_LEN,
27881                __tmp.remaining(),
27882            )
27883        }
27884        __tmp.put_f32_le(self.angle_of_attack_normal);
27885        __tmp.put_f32_le(self.angle_of_attack_inverted);
27886        __tmp.put_f32_le(self.elevator_trim_normal);
27887        __tmp.put_f32_le(self.elevator_trim_inverted);
27888        __tmp.put_f32_le(self.reference_speed);
27889        if matches!(version, MavlinkVersion::V2) {
27890            let len = __tmp.len();
27891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27892        } else {
27893            __tmp.len()
27894        }
27895    }
27896}
27897#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F19 format."]
27898#[doc = ""]
27899#[doc = "ID: 185"]
27900#[derive(Debug, Clone, PartialEq)]
27901#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27902#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27903pub struct SERIAL_UDB_EXTRA_F19_DATA {
27904    #[doc = "SUE aileron output channel"]
27905    pub sue_aileron_output_channel: u8,
27906    #[doc = "SUE aileron reversed"]
27907    pub sue_aileron_reversed: u8,
27908    #[doc = "SUE elevator output channel"]
27909    pub sue_elevator_output_channel: u8,
27910    #[doc = "SUE elevator reversed"]
27911    pub sue_elevator_reversed: u8,
27912    #[doc = "SUE throttle output channel"]
27913    pub sue_throttle_output_channel: u8,
27914    #[doc = "SUE throttle reversed"]
27915    pub sue_throttle_reversed: u8,
27916    #[doc = "SUE rudder output channel"]
27917    pub sue_rudder_output_channel: u8,
27918    #[doc = "SUE rudder reversed"]
27919    pub sue_rudder_reversed: u8,
27920}
27921impl SERIAL_UDB_EXTRA_F19_DATA {
27922    pub const ENCODED_LEN: usize = 8usize;
27923    pub const DEFAULT: Self = Self {
27924        sue_aileron_output_channel: 0_u8,
27925        sue_aileron_reversed: 0_u8,
27926        sue_elevator_output_channel: 0_u8,
27927        sue_elevator_reversed: 0_u8,
27928        sue_throttle_output_channel: 0_u8,
27929        sue_throttle_reversed: 0_u8,
27930        sue_rudder_output_channel: 0_u8,
27931        sue_rudder_reversed: 0_u8,
27932    };
27933    #[cfg(feature = "arbitrary")]
27934    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27935        use arbitrary::{Arbitrary, Unstructured};
27936        let mut buf = [0u8; 1024];
27937        rng.fill_bytes(&mut buf);
27938        let mut unstructured = Unstructured::new(&buf);
27939        Self::arbitrary(&mut unstructured).unwrap_or_default()
27940    }
27941}
27942impl Default for SERIAL_UDB_EXTRA_F19_DATA {
27943    fn default() -> Self {
27944        Self::DEFAULT.clone()
27945    }
27946}
27947impl MessageData for SERIAL_UDB_EXTRA_F19_DATA {
27948    type Message = MavMessage;
27949    const ID: u32 = 185u32;
27950    const NAME: &'static str = "SERIAL_UDB_EXTRA_F19";
27951    const EXTRA_CRC: u8 = 87u8;
27952    const ENCODED_LEN: usize = 8usize;
27953    fn deser(
27954        _version: MavlinkVersion,
27955        __input: &[u8],
27956    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27957        let avail_len = __input.len();
27958        let mut payload_buf = [0; Self::ENCODED_LEN];
27959        let mut buf = if avail_len < Self::ENCODED_LEN {
27960            payload_buf[0..avail_len].copy_from_slice(__input);
27961            Bytes::new(&payload_buf)
27962        } else {
27963            Bytes::new(__input)
27964        };
27965        let mut __struct = Self::default();
27966        __struct.sue_aileron_output_channel = buf.get_u8();
27967        __struct.sue_aileron_reversed = buf.get_u8();
27968        __struct.sue_elevator_output_channel = buf.get_u8();
27969        __struct.sue_elevator_reversed = buf.get_u8();
27970        __struct.sue_throttle_output_channel = buf.get_u8();
27971        __struct.sue_throttle_reversed = buf.get_u8();
27972        __struct.sue_rudder_output_channel = buf.get_u8();
27973        __struct.sue_rudder_reversed = buf.get_u8();
27974        Ok(__struct)
27975    }
27976    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27977        let mut __tmp = BytesMut::new(bytes);
27978        #[allow(clippy::absurd_extreme_comparisons)]
27979        #[allow(unused_comparisons)]
27980        if __tmp.remaining() < Self::ENCODED_LEN {
27981            panic!(
27982                "buffer is too small (need {} bytes, but got {})",
27983                Self::ENCODED_LEN,
27984                __tmp.remaining(),
27985            )
27986        }
27987        __tmp.put_u8(self.sue_aileron_output_channel);
27988        __tmp.put_u8(self.sue_aileron_reversed);
27989        __tmp.put_u8(self.sue_elevator_output_channel);
27990        __tmp.put_u8(self.sue_elevator_reversed);
27991        __tmp.put_u8(self.sue_throttle_output_channel);
27992        __tmp.put_u8(self.sue_throttle_reversed);
27993        __tmp.put_u8(self.sue_rudder_output_channel);
27994        __tmp.put_u8(self.sue_rudder_reversed);
27995        if matches!(version, MavlinkVersion::V2) {
27996            let len = __tmp.len();
27997            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27998        } else {
27999            __tmp.len()
28000        }
28001    }
28002}
28003#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F20 format."]
28004#[doc = ""]
28005#[doc = "ID: 186"]
28006#[derive(Debug, Clone, PartialEq)]
28007#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28008#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28009pub struct SERIAL_UDB_EXTRA_F20_DATA {
28010    #[doc = "SUE UDB PWM Trim Value on Input 1"]
28011    pub sue_trim_value_input_1: i16,
28012    #[doc = "SUE UDB PWM Trim Value on Input 2"]
28013    pub sue_trim_value_input_2: i16,
28014    #[doc = "SUE UDB PWM Trim Value on Input 3"]
28015    pub sue_trim_value_input_3: i16,
28016    #[doc = "SUE UDB PWM Trim Value on Input 4"]
28017    pub sue_trim_value_input_4: i16,
28018    #[doc = "SUE UDB PWM Trim Value on Input 5"]
28019    pub sue_trim_value_input_5: i16,
28020    #[doc = "SUE UDB PWM Trim Value on Input 6"]
28021    pub sue_trim_value_input_6: i16,
28022    #[doc = "SUE UDB PWM Trim Value on Input 7"]
28023    pub sue_trim_value_input_7: i16,
28024    #[doc = "SUE UDB PWM Trim Value on Input 8"]
28025    pub sue_trim_value_input_8: i16,
28026    #[doc = "SUE UDB PWM Trim Value on Input 9"]
28027    pub sue_trim_value_input_9: i16,
28028    #[doc = "SUE UDB PWM Trim Value on Input 10"]
28029    pub sue_trim_value_input_10: i16,
28030    #[doc = "SUE UDB PWM Trim Value on Input 11"]
28031    pub sue_trim_value_input_11: i16,
28032    #[doc = "SUE UDB PWM Trim Value on Input 12"]
28033    pub sue_trim_value_input_12: i16,
28034    #[doc = "SUE Number of Input Channels"]
28035    pub sue_number_of_inputs: u8,
28036}
28037impl SERIAL_UDB_EXTRA_F20_DATA {
28038    pub const ENCODED_LEN: usize = 25usize;
28039    pub const DEFAULT: Self = Self {
28040        sue_trim_value_input_1: 0_i16,
28041        sue_trim_value_input_2: 0_i16,
28042        sue_trim_value_input_3: 0_i16,
28043        sue_trim_value_input_4: 0_i16,
28044        sue_trim_value_input_5: 0_i16,
28045        sue_trim_value_input_6: 0_i16,
28046        sue_trim_value_input_7: 0_i16,
28047        sue_trim_value_input_8: 0_i16,
28048        sue_trim_value_input_9: 0_i16,
28049        sue_trim_value_input_10: 0_i16,
28050        sue_trim_value_input_11: 0_i16,
28051        sue_trim_value_input_12: 0_i16,
28052        sue_number_of_inputs: 0_u8,
28053    };
28054    #[cfg(feature = "arbitrary")]
28055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28056        use arbitrary::{Arbitrary, Unstructured};
28057        let mut buf = [0u8; 1024];
28058        rng.fill_bytes(&mut buf);
28059        let mut unstructured = Unstructured::new(&buf);
28060        Self::arbitrary(&mut unstructured).unwrap_or_default()
28061    }
28062}
28063impl Default for SERIAL_UDB_EXTRA_F20_DATA {
28064    fn default() -> Self {
28065        Self::DEFAULT.clone()
28066    }
28067}
28068impl MessageData for SERIAL_UDB_EXTRA_F20_DATA {
28069    type Message = MavMessage;
28070    const ID: u32 = 186u32;
28071    const NAME: &'static str = "SERIAL_UDB_EXTRA_F20";
28072    const EXTRA_CRC: u8 = 144u8;
28073    const ENCODED_LEN: usize = 25usize;
28074    fn deser(
28075        _version: MavlinkVersion,
28076        __input: &[u8],
28077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28078        let avail_len = __input.len();
28079        let mut payload_buf = [0; Self::ENCODED_LEN];
28080        let mut buf = if avail_len < Self::ENCODED_LEN {
28081            payload_buf[0..avail_len].copy_from_slice(__input);
28082            Bytes::new(&payload_buf)
28083        } else {
28084            Bytes::new(__input)
28085        };
28086        let mut __struct = Self::default();
28087        __struct.sue_trim_value_input_1 = buf.get_i16_le();
28088        __struct.sue_trim_value_input_2 = buf.get_i16_le();
28089        __struct.sue_trim_value_input_3 = buf.get_i16_le();
28090        __struct.sue_trim_value_input_4 = buf.get_i16_le();
28091        __struct.sue_trim_value_input_5 = buf.get_i16_le();
28092        __struct.sue_trim_value_input_6 = buf.get_i16_le();
28093        __struct.sue_trim_value_input_7 = buf.get_i16_le();
28094        __struct.sue_trim_value_input_8 = buf.get_i16_le();
28095        __struct.sue_trim_value_input_9 = buf.get_i16_le();
28096        __struct.sue_trim_value_input_10 = buf.get_i16_le();
28097        __struct.sue_trim_value_input_11 = buf.get_i16_le();
28098        __struct.sue_trim_value_input_12 = buf.get_i16_le();
28099        __struct.sue_number_of_inputs = buf.get_u8();
28100        Ok(__struct)
28101    }
28102    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28103        let mut __tmp = BytesMut::new(bytes);
28104        #[allow(clippy::absurd_extreme_comparisons)]
28105        #[allow(unused_comparisons)]
28106        if __tmp.remaining() < Self::ENCODED_LEN {
28107            panic!(
28108                "buffer is too small (need {} bytes, but got {})",
28109                Self::ENCODED_LEN,
28110                __tmp.remaining(),
28111            )
28112        }
28113        __tmp.put_i16_le(self.sue_trim_value_input_1);
28114        __tmp.put_i16_le(self.sue_trim_value_input_2);
28115        __tmp.put_i16_le(self.sue_trim_value_input_3);
28116        __tmp.put_i16_le(self.sue_trim_value_input_4);
28117        __tmp.put_i16_le(self.sue_trim_value_input_5);
28118        __tmp.put_i16_le(self.sue_trim_value_input_6);
28119        __tmp.put_i16_le(self.sue_trim_value_input_7);
28120        __tmp.put_i16_le(self.sue_trim_value_input_8);
28121        __tmp.put_i16_le(self.sue_trim_value_input_9);
28122        __tmp.put_i16_le(self.sue_trim_value_input_10);
28123        __tmp.put_i16_le(self.sue_trim_value_input_11);
28124        __tmp.put_i16_le(self.sue_trim_value_input_12);
28125        __tmp.put_u8(self.sue_number_of_inputs);
28126        if matches!(version, MavlinkVersion::V2) {
28127            let len = __tmp.len();
28128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28129        } else {
28130            __tmp.len()
28131        }
28132    }
28133}
28134#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F21 format."]
28135#[doc = ""]
28136#[doc = "ID: 187"]
28137#[derive(Debug, Clone, PartialEq)]
28138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28139#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28140pub struct SERIAL_UDB_EXTRA_F21_DATA {
28141    #[doc = "SUE X accelerometer offset"]
28142    pub sue_accel_x_offset: i16,
28143    #[doc = "SUE Y accelerometer offset"]
28144    pub sue_accel_y_offset: i16,
28145    #[doc = "SUE Z accelerometer offset"]
28146    pub sue_accel_z_offset: i16,
28147    #[doc = "SUE X gyro offset"]
28148    pub sue_gyro_x_offset: i16,
28149    #[doc = "SUE Y gyro offset"]
28150    pub sue_gyro_y_offset: i16,
28151    #[doc = "SUE Z gyro offset"]
28152    pub sue_gyro_z_offset: i16,
28153}
28154impl SERIAL_UDB_EXTRA_F21_DATA {
28155    pub const ENCODED_LEN: usize = 12usize;
28156    pub const DEFAULT: Self = Self {
28157        sue_accel_x_offset: 0_i16,
28158        sue_accel_y_offset: 0_i16,
28159        sue_accel_z_offset: 0_i16,
28160        sue_gyro_x_offset: 0_i16,
28161        sue_gyro_y_offset: 0_i16,
28162        sue_gyro_z_offset: 0_i16,
28163    };
28164    #[cfg(feature = "arbitrary")]
28165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28166        use arbitrary::{Arbitrary, Unstructured};
28167        let mut buf = [0u8; 1024];
28168        rng.fill_bytes(&mut buf);
28169        let mut unstructured = Unstructured::new(&buf);
28170        Self::arbitrary(&mut unstructured).unwrap_or_default()
28171    }
28172}
28173impl Default for SERIAL_UDB_EXTRA_F21_DATA {
28174    fn default() -> Self {
28175        Self::DEFAULT.clone()
28176    }
28177}
28178impl MessageData for SERIAL_UDB_EXTRA_F21_DATA {
28179    type Message = MavMessage;
28180    const ID: u32 = 187u32;
28181    const NAME: &'static str = "SERIAL_UDB_EXTRA_F21";
28182    const EXTRA_CRC: u8 = 134u8;
28183    const ENCODED_LEN: usize = 12usize;
28184    fn deser(
28185        _version: MavlinkVersion,
28186        __input: &[u8],
28187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28188        let avail_len = __input.len();
28189        let mut payload_buf = [0; Self::ENCODED_LEN];
28190        let mut buf = if avail_len < Self::ENCODED_LEN {
28191            payload_buf[0..avail_len].copy_from_slice(__input);
28192            Bytes::new(&payload_buf)
28193        } else {
28194            Bytes::new(__input)
28195        };
28196        let mut __struct = Self::default();
28197        __struct.sue_accel_x_offset = buf.get_i16_le();
28198        __struct.sue_accel_y_offset = buf.get_i16_le();
28199        __struct.sue_accel_z_offset = buf.get_i16_le();
28200        __struct.sue_gyro_x_offset = buf.get_i16_le();
28201        __struct.sue_gyro_y_offset = buf.get_i16_le();
28202        __struct.sue_gyro_z_offset = buf.get_i16_le();
28203        Ok(__struct)
28204    }
28205    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28206        let mut __tmp = BytesMut::new(bytes);
28207        #[allow(clippy::absurd_extreme_comparisons)]
28208        #[allow(unused_comparisons)]
28209        if __tmp.remaining() < Self::ENCODED_LEN {
28210            panic!(
28211                "buffer is too small (need {} bytes, but got {})",
28212                Self::ENCODED_LEN,
28213                __tmp.remaining(),
28214            )
28215        }
28216        __tmp.put_i16_le(self.sue_accel_x_offset);
28217        __tmp.put_i16_le(self.sue_accel_y_offset);
28218        __tmp.put_i16_le(self.sue_accel_z_offset);
28219        __tmp.put_i16_le(self.sue_gyro_x_offset);
28220        __tmp.put_i16_le(self.sue_gyro_y_offset);
28221        __tmp.put_i16_le(self.sue_gyro_z_offset);
28222        if matches!(version, MavlinkVersion::V2) {
28223            let len = __tmp.len();
28224            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28225        } else {
28226            __tmp.len()
28227        }
28228    }
28229}
28230#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F22 format."]
28231#[doc = ""]
28232#[doc = "ID: 188"]
28233#[derive(Debug, Clone, PartialEq)]
28234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28236pub struct SERIAL_UDB_EXTRA_F22_DATA {
28237    #[doc = "SUE X accelerometer at calibration time"]
28238    pub sue_accel_x_at_calibration: i16,
28239    #[doc = "SUE Y accelerometer at calibration time"]
28240    pub sue_accel_y_at_calibration: i16,
28241    #[doc = "SUE Z accelerometer at calibration time"]
28242    pub sue_accel_z_at_calibration: i16,
28243    #[doc = "SUE X gyro at calibration time"]
28244    pub sue_gyro_x_at_calibration: i16,
28245    #[doc = "SUE Y gyro at calibration time"]
28246    pub sue_gyro_y_at_calibration: i16,
28247    #[doc = "SUE Z gyro at calibration time"]
28248    pub sue_gyro_z_at_calibration: i16,
28249}
28250impl SERIAL_UDB_EXTRA_F22_DATA {
28251    pub const ENCODED_LEN: usize = 12usize;
28252    pub const DEFAULT: Self = Self {
28253        sue_accel_x_at_calibration: 0_i16,
28254        sue_accel_y_at_calibration: 0_i16,
28255        sue_accel_z_at_calibration: 0_i16,
28256        sue_gyro_x_at_calibration: 0_i16,
28257        sue_gyro_y_at_calibration: 0_i16,
28258        sue_gyro_z_at_calibration: 0_i16,
28259    };
28260    #[cfg(feature = "arbitrary")]
28261    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28262        use arbitrary::{Arbitrary, Unstructured};
28263        let mut buf = [0u8; 1024];
28264        rng.fill_bytes(&mut buf);
28265        let mut unstructured = Unstructured::new(&buf);
28266        Self::arbitrary(&mut unstructured).unwrap_or_default()
28267    }
28268}
28269impl Default for SERIAL_UDB_EXTRA_F22_DATA {
28270    fn default() -> Self {
28271        Self::DEFAULT.clone()
28272    }
28273}
28274impl MessageData for SERIAL_UDB_EXTRA_F22_DATA {
28275    type Message = MavMessage;
28276    const ID: u32 = 188u32;
28277    const NAME: &'static str = "SERIAL_UDB_EXTRA_F22";
28278    const EXTRA_CRC: u8 = 91u8;
28279    const ENCODED_LEN: usize = 12usize;
28280    fn deser(
28281        _version: MavlinkVersion,
28282        __input: &[u8],
28283    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28284        let avail_len = __input.len();
28285        let mut payload_buf = [0; Self::ENCODED_LEN];
28286        let mut buf = if avail_len < Self::ENCODED_LEN {
28287            payload_buf[0..avail_len].copy_from_slice(__input);
28288            Bytes::new(&payload_buf)
28289        } else {
28290            Bytes::new(__input)
28291        };
28292        let mut __struct = Self::default();
28293        __struct.sue_accel_x_at_calibration = buf.get_i16_le();
28294        __struct.sue_accel_y_at_calibration = buf.get_i16_le();
28295        __struct.sue_accel_z_at_calibration = buf.get_i16_le();
28296        __struct.sue_gyro_x_at_calibration = buf.get_i16_le();
28297        __struct.sue_gyro_y_at_calibration = buf.get_i16_le();
28298        __struct.sue_gyro_z_at_calibration = buf.get_i16_le();
28299        Ok(__struct)
28300    }
28301    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28302        let mut __tmp = BytesMut::new(bytes);
28303        #[allow(clippy::absurd_extreme_comparisons)]
28304        #[allow(unused_comparisons)]
28305        if __tmp.remaining() < Self::ENCODED_LEN {
28306            panic!(
28307                "buffer is too small (need {} bytes, but got {})",
28308                Self::ENCODED_LEN,
28309                __tmp.remaining(),
28310            )
28311        }
28312        __tmp.put_i16_le(self.sue_accel_x_at_calibration);
28313        __tmp.put_i16_le(self.sue_accel_y_at_calibration);
28314        __tmp.put_i16_le(self.sue_accel_z_at_calibration);
28315        __tmp.put_i16_le(self.sue_gyro_x_at_calibration);
28316        __tmp.put_i16_le(self.sue_gyro_y_at_calibration);
28317        __tmp.put_i16_le(self.sue_gyro_z_at_calibration);
28318        if matches!(version, MavlinkVersion::V2) {
28319            let len = __tmp.len();
28320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28321        } else {
28322            __tmp.len()
28323        }
28324    }
28325}
28326#[doc = "Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A."]
28327#[doc = ""]
28328#[doc = "ID: 170"]
28329#[derive(Debug, Clone, PartialEq)]
28330#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28331#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28332pub struct SERIAL_UDB_EXTRA_F2_A_DATA {
28333    #[doc = "Serial UDB Extra Time"]
28334    pub sue_time: u32,
28335    #[doc = "Serial UDB Extra Latitude"]
28336    pub sue_latitude: i32,
28337    #[doc = "Serial UDB Extra Longitude"]
28338    pub sue_longitude: i32,
28339    #[doc = "Serial UDB Extra Altitude"]
28340    pub sue_altitude: i32,
28341    #[doc = "Serial UDB Extra Waypoint Index"]
28342    pub sue_waypoint_index: u16,
28343    #[doc = "Serial UDB Extra Rmat 0"]
28344    pub sue_rmat0: i16,
28345    #[doc = "Serial UDB Extra Rmat 1"]
28346    pub sue_rmat1: i16,
28347    #[doc = "Serial UDB Extra Rmat 2"]
28348    pub sue_rmat2: i16,
28349    #[doc = "Serial UDB Extra Rmat 3"]
28350    pub sue_rmat3: i16,
28351    #[doc = "Serial UDB Extra Rmat 4"]
28352    pub sue_rmat4: i16,
28353    #[doc = "Serial UDB Extra Rmat 5"]
28354    pub sue_rmat5: i16,
28355    #[doc = "Serial UDB Extra Rmat 6"]
28356    pub sue_rmat6: i16,
28357    #[doc = "Serial UDB Extra Rmat 7"]
28358    pub sue_rmat7: i16,
28359    #[doc = "Serial UDB Extra Rmat 8"]
28360    pub sue_rmat8: i16,
28361    #[doc = "Serial UDB Extra GPS Course Over Ground"]
28362    pub sue_cog: u16,
28363    #[doc = "Serial UDB Extra Speed Over Ground"]
28364    pub sue_sog: i16,
28365    #[doc = "Serial UDB Extra CPU Load"]
28366    pub sue_cpu_load: u16,
28367    #[doc = "Serial UDB Extra 3D IMU Air Speed"]
28368    pub sue_air_speed_3DIMU: u16,
28369    #[doc = "Serial UDB Extra Estimated Wind 0"]
28370    pub sue_estimated_wind_0: i16,
28371    #[doc = "Serial UDB Extra Estimated Wind 1"]
28372    pub sue_estimated_wind_1: i16,
28373    #[doc = "Serial UDB Extra Estimated Wind 2"]
28374    pub sue_estimated_wind_2: i16,
28375    #[doc = "Serial UDB Extra Magnetic Field Earth 0"]
28376    pub sue_magFieldEarth0: i16,
28377    #[doc = "Serial UDB Extra Magnetic Field Earth 1"]
28378    pub sue_magFieldEarth1: i16,
28379    #[doc = "Serial UDB Extra Magnetic Field Earth 2"]
28380    pub sue_magFieldEarth2: i16,
28381    #[doc = "Serial UDB Extra Number of Satellites in View"]
28382    pub sue_svs: i16,
28383    #[doc = "Serial UDB Extra GPS Horizontal Dilution of Precision"]
28384    pub sue_hdop: i16,
28385    #[doc = "Serial UDB Extra Status"]
28386    pub sue_status: u8,
28387}
28388impl SERIAL_UDB_EXTRA_F2_A_DATA {
28389    pub const ENCODED_LEN: usize = 61usize;
28390    pub const DEFAULT: Self = Self {
28391        sue_time: 0_u32,
28392        sue_latitude: 0_i32,
28393        sue_longitude: 0_i32,
28394        sue_altitude: 0_i32,
28395        sue_waypoint_index: 0_u16,
28396        sue_rmat0: 0_i16,
28397        sue_rmat1: 0_i16,
28398        sue_rmat2: 0_i16,
28399        sue_rmat3: 0_i16,
28400        sue_rmat4: 0_i16,
28401        sue_rmat5: 0_i16,
28402        sue_rmat6: 0_i16,
28403        sue_rmat7: 0_i16,
28404        sue_rmat8: 0_i16,
28405        sue_cog: 0_u16,
28406        sue_sog: 0_i16,
28407        sue_cpu_load: 0_u16,
28408        sue_air_speed_3DIMU: 0_u16,
28409        sue_estimated_wind_0: 0_i16,
28410        sue_estimated_wind_1: 0_i16,
28411        sue_estimated_wind_2: 0_i16,
28412        sue_magFieldEarth0: 0_i16,
28413        sue_magFieldEarth1: 0_i16,
28414        sue_magFieldEarth2: 0_i16,
28415        sue_svs: 0_i16,
28416        sue_hdop: 0_i16,
28417        sue_status: 0_u8,
28418    };
28419    #[cfg(feature = "arbitrary")]
28420    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28421        use arbitrary::{Arbitrary, Unstructured};
28422        let mut buf = [0u8; 1024];
28423        rng.fill_bytes(&mut buf);
28424        let mut unstructured = Unstructured::new(&buf);
28425        Self::arbitrary(&mut unstructured).unwrap_or_default()
28426    }
28427}
28428impl Default for SERIAL_UDB_EXTRA_F2_A_DATA {
28429    fn default() -> Self {
28430        Self::DEFAULT.clone()
28431    }
28432}
28433impl MessageData for SERIAL_UDB_EXTRA_F2_A_DATA {
28434    type Message = MavMessage;
28435    const ID: u32 = 170u32;
28436    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_A";
28437    const EXTRA_CRC: u8 = 103u8;
28438    const ENCODED_LEN: usize = 61usize;
28439    fn deser(
28440        _version: MavlinkVersion,
28441        __input: &[u8],
28442    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28443        let avail_len = __input.len();
28444        let mut payload_buf = [0; Self::ENCODED_LEN];
28445        let mut buf = if avail_len < Self::ENCODED_LEN {
28446            payload_buf[0..avail_len].copy_from_slice(__input);
28447            Bytes::new(&payload_buf)
28448        } else {
28449            Bytes::new(__input)
28450        };
28451        let mut __struct = Self::default();
28452        __struct.sue_time = buf.get_u32_le();
28453        __struct.sue_latitude = buf.get_i32_le();
28454        __struct.sue_longitude = buf.get_i32_le();
28455        __struct.sue_altitude = buf.get_i32_le();
28456        __struct.sue_waypoint_index = buf.get_u16_le();
28457        __struct.sue_rmat0 = buf.get_i16_le();
28458        __struct.sue_rmat1 = buf.get_i16_le();
28459        __struct.sue_rmat2 = buf.get_i16_le();
28460        __struct.sue_rmat3 = buf.get_i16_le();
28461        __struct.sue_rmat4 = buf.get_i16_le();
28462        __struct.sue_rmat5 = buf.get_i16_le();
28463        __struct.sue_rmat6 = buf.get_i16_le();
28464        __struct.sue_rmat7 = buf.get_i16_le();
28465        __struct.sue_rmat8 = buf.get_i16_le();
28466        __struct.sue_cog = buf.get_u16_le();
28467        __struct.sue_sog = buf.get_i16_le();
28468        __struct.sue_cpu_load = buf.get_u16_le();
28469        __struct.sue_air_speed_3DIMU = buf.get_u16_le();
28470        __struct.sue_estimated_wind_0 = buf.get_i16_le();
28471        __struct.sue_estimated_wind_1 = buf.get_i16_le();
28472        __struct.sue_estimated_wind_2 = buf.get_i16_le();
28473        __struct.sue_magFieldEarth0 = buf.get_i16_le();
28474        __struct.sue_magFieldEarth1 = buf.get_i16_le();
28475        __struct.sue_magFieldEarth2 = buf.get_i16_le();
28476        __struct.sue_svs = buf.get_i16_le();
28477        __struct.sue_hdop = buf.get_i16_le();
28478        __struct.sue_status = buf.get_u8();
28479        Ok(__struct)
28480    }
28481    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28482        let mut __tmp = BytesMut::new(bytes);
28483        #[allow(clippy::absurd_extreme_comparisons)]
28484        #[allow(unused_comparisons)]
28485        if __tmp.remaining() < Self::ENCODED_LEN {
28486            panic!(
28487                "buffer is too small (need {} bytes, but got {})",
28488                Self::ENCODED_LEN,
28489                __tmp.remaining(),
28490            )
28491        }
28492        __tmp.put_u32_le(self.sue_time);
28493        __tmp.put_i32_le(self.sue_latitude);
28494        __tmp.put_i32_le(self.sue_longitude);
28495        __tmp.put_i32_le(self.sue_altitude);
28496        __tmp.put_u16_le(self.sue_waypoint_index);
28497        __tmp.put_i16_le(self.sue_rmat0);
28498        __tmp.put_i16_le(self.sue_rmat1);
28499        __tmp.put_i16_le(self.sue_rmat2);
28500        __tmp.put_i16_le(self.sue_rmat3);
28501        __tmp.put_i16_le(self.sue_rmat4);
28502        __tmp.put_i16_le(self.sue_rmat5);
28503        __tmp.put_i16_le(self.sue_rmat6);
28504        __tmp.put_i16_le(self.sue_rmat7);
28505        __tmp.put_i16_le(self.sue_rmat8);
28506        __tmp.put_u16_le(self.sue_cog);
28507        __tmp.put_i16_le(self.sue_sog);
28508        __tmp.put_u16_le(self.sue_cpu_load);
28509        __tmp.put_u16_le(self.sue_air_speed_3DIMU);
28510        __tmp.put_i16_le(self.sue_estimated_wind_0);
28511        __tmp.put_i16_le(self.sue_estimated_wind_1);
28512        __tmp.put_i16_le(self.sue_estimated_wind_2);
28513        __tmp.put_i16_le(self.sue_magFieldEarth0);
28514        __tmp.put_i16_le(self.sue_magFieldEarth1);
28515        __tmp.put_i16_le(self.sue_magFieldEarth2);
28516        __tmp.put_i16_le(self.sue_svs);
28517        __tmp.put_i16_le(self.sue_hdop);
28518        __tmp.put_u8(self.sue_status);
28519        if matches!(version, MavlinkVersion::V2) {
28520            let len = __tmp.len();
28521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28522        } else {
28523            __tmp.len()
28524        }
28525    }
28526}
28527#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B."]
28528#[doc = ""]
28529#[doc = "ID: 171"]
28530#[derive(Debug, Clone, PartialEq)]
28531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28533pub struct SERIAL_UDB_EXTRA_F2_B_DATA {
28534    #[doc = "Serial UDB Extra Time"]
28535    pub sue_time: u32,
28536    #[doc = "Serial UDB Extra Status Flags"]
28537    pub sue_flags: u32,
28538    #[doc = "SUE barometer pressure"]
28539    pub sue_barom_press: i32,
28540    #[doc = "SUE barometer altitude"]
28541    pub sue_barom_alt: i32,
28542    #[doc = "Serial UDB Extra PWM Input Channel 1"]
28543    pub sue_pwm_input_1: i16,
28544    #[doc = "Serial UDB Extra PWM Input Channel 2"]
28545    pub sue_pwm_input_2: i16,
28546    #[doc = "Serial UDB Extra PWM Input Channel 3"]
28547    pub sue_pwm_input_3: i16,
28548    #[doc = "Serial UDB Extra PWM Input Channel 4"]
28549    pub sue_pwm_input_4: i16,
28550    #[doc = "Serial UDB Extra PWM Input Channel 5"]
28551    pub sue_pwm_input_5: i16,
28552    #[doc = "Serial UDB Extra PWM Input Channel 6"]
28553    pub sue_pwm_input_6: i16,
28554    #[doc = "Serial UDB Extra PWM Input Channel 7"]
28555    pub sue_pwm_input_7: i16,
28556    #[doc = "Serial UDB Extra PWM Input Channel 8"]
28557    pub sue_pwm_input_8: i16,
28558    #[doc = "Serial UDB Extra PWM Input Channel 9"]
28559    pub sue_pwm_input_9: i16,
28560    #[doc = "Serial UDB Extra PWM Input Channel 10"]
28561    pub sue_pwm_input_10: i16,
28562    #[doc = "Serial UDB Extra PWM Input Channel 11"]
28563    pub sue_pwm_input_11: i16,
28564    #[doc = "Serial UDB Extra PWM Input Channel 12"]
28565    pub sue_pwm_input_12: i16,
28566    #[doc = "Serial UDB Extra PWM Output Channel 1"]
28567    pub sue_pwm_output_1: i16,
28568    #[doc = "Serial UDB Extra PWM Output Channel 2"]
28569    pub sue_pwm_output_2: i16,
28570    #[doc = "Serial UDB Extra PWM Output Channel 3"]
28571    pub sue_pwm_output_3: i16,
28572    #[doc = "Serial UDB Extra PWM Output Channel 4"]
28573    pub sue_pwm_output_4: i16,
28574    #[doc = "Serial UDB Extra PWM Output Channel 5"]
28575    pub sue_pwm_output_5: i16,
28576    #[doc = "Serial UDB Extra PWM Output Channel 6"]
28577    pub sue_pwm_output_6: i16,
28578    #[doc = "Serial UDB Extra PWM Output Channel 7"]
28579    pub sue_pwm_output_7: i16,
28580    #[doc = "Serial UDB Extra PWM Output Channel 8"]
28581    pub sue_pwm_output_8: i16,
28582    #[doc = "Serial UDB Extra PWM Output Channel 9"]
28583    pub sue_pwm_output_9: i16,
28584    #[doc = "Serial UDB Extra PWM Output Channel 10"]
28585    pub sue_pwm_output_10: i16,
28586    #[doc = "Serial UDB Extra PWM Output Channel 11"]
28587    pub sue_pwm_output_11: i16,
28588    #[doc = "Serial UDB Extra PWM Output Channel 12"]
28589    pub sue_pwm_output_12: i16,
28590    #[doc = "Serial UDB Extra IMU Location X"]
28591    pub sue_imu_location_x: i16,
28592    #[doc = "Serial UDB Extra IMU Location Y"]
28593    pub sue_imu_location_y: i16,
28594    #[doc = "Serial UDB Extra IMU Location Z"]
28595    pub sue_imu_location_z: i16,
28596    #[doc = "Serial UDB Location Error Earth X"]
28597    pub sue_location_error_earth_x: i16,
28598    #[doc = "Serial UDB Location Error Earth Y"]
28599    pub sue_location_error_earth_y: i16,
28600    #[doc = "Serial UDB Location Error Earth Z"]
28601    pub sue_location_error_earth_z: i16,
28602    #[doc = "Serial UDB Extra Oscillator Failure Count"]
28603    pub sue_osc_fails: i16,
28604    #[doc = "Serial UDB Extra IMU Velocity X"]
28605    pub sue_imu_velocity_x: i16,
28606    #[doc = "Serial UDB Extra IMU Velocity Y"]
28607    pub sue_imu_velocity_y: i16,
28608    #[doc = "Serial UDB Extra IMU Velocity Z"]
28609    pub sue_imu_velocity_z: i16,
28610    #[doc = "Serial UDB Extra Current Waypoint Goal X"]
28611    pub sue_waypoint_goal_x: i16,
28612    #[doc = "Serial UDB Extra Current Waypoint Goal Y"]
28613    pub sue_waypoint_goal_y: i16,
28614    #[doc = "Serial UDB Extra Current Waypoint Goal Z"]
28615    pub sue_waypoint_goal_z: i16,
28616    #[doc = "Aeroforce in UDB X Axis"]
28617    pub sue_aero_x: i16,
28618    #[doc = "Aeroforce in UDB Y Axis"]
28619    pub sue_aero_y: i16,
28620    #[doc = "Aeroforce in UDB Z axis"]
28621    pub sue_aero_z: i16,
28622    #[doc = "SUE barometer temperature"]
28623    pub sue_barom_temp: i16,
28624    #[doc = "SUE battery voltage"]
28625    pub sue_bat_volt: i16,
28626    #[doc = "SUE battery current"]
28627    pub sue_bat_amp: i16,
28628    #[doc = "SUE battery milli amp hours used"]
28629    pub sue_bat_amp_hours: i16,
28630    #[doc = "Sue autopilot desired height"]
28631    pub sue_desired_height: i16,
28632    #[doc = "Serial UDB Extra Stack Memory Free"]
28633    pub sue_memory_stack_free: i16,
28634}
28635impl SERIAL_UDB_EXTRA_F2_B_DATA {
28636    pub const ENCODED_LEN: usize = 108usize;
28637    pub const DEFAULT: Self = Self {
28638        sue_time: 0_u32,
28639        sue_flags: 0_u32,
28640        sue_barom_press: 0_i32,
28641        sue_barom_alt: 0_i32,
28642        sue_pwm_input_1: 0_i16,
28643        sue_pwm_input_2: 0_i16,
28644        sue_pwm_input_3: 0_i16,
28645        sue_pwm_input_4: 0_i16,
28646        sue_pwm_input_5: 0_i16,
28647        sue_pwm_input_6: 0_i16,
28648        sue_pwm_input_7: 0_i16,
28649        sue_pwm_input_8: 0_i16,
28650        sue_pwm_input_9: 0_i16,
28651        sue_pwm_input_10: 0_i16,
28652        sue_pwm_input_11: 0_i16,
28653        sue_pwm_input_12: 0_i16,
28654        sue_pwm_output_1: 0_i16,
28655        sue_pwm_output_2: 0_i16,
28656        sue_pwm_output_3: 0_i16,
28657        sue_pwm_output_4: 0_i16,
28658        sue_pwm_output_5: 0_i16,
28659        sue_pwm_output_6: 0_i16,
28660        sue_pwm_output_7: 0_i16,
28661        sue_pwm_output_8: 0_i16,
28662        sue_pwm_output_9: 0_i16,
28663        sue_pwm_output_10: 0_i16,
28664        sue_pwm_output_11: 0_i16,
28665        sue_pwm_output_12: 0_i16,
28666        sue_imu_location_x: 0_i16,
28667        sue_imu_location_y: 0_i16,
28668        sue_imu_location_z: 0_i16,
28669        sue_location_error_earth_x: 0_i16,
28670        sue_location_error_earth_y: 0_i16,
28671        sue_location_error_earth_z: 0_i16,
28672        sue_osc_fails: 0_i16,
28673        sue_imu_velocity_x: 0_i16,
28674        sue_imu_velocity_y: 0_i16,
28675        sue_imu_velocity_z: 0_i16,
28676        sue_waypoint_goal_x: 0_i16,
28677        sue_waypoint_goal_y: 0_i16,
28678        sue_waypoint_goal_z: 0_i16,
28679        sue_aero_x: 0_i16,
28680        sue_aero_y: 0_i16,
28681        sue_aero_z: 0_i16,
28682        sue_barom_temp: 0_i16,
28683        sue_bat_volt: 0_i16,
28684        sue_bat_amp: 0_i16,
28685        sue_bat_amp_hours: 0_i16,
28686        sue_desired_height: 0_i16,
28687        sue_memory_stack_free: 0_i16,
28688    };
28689    #[cfg(feature = "arbitrary")]
28690    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28691        use arbitrary::{Arbitrary, Unstructured};
28692        let mut buf = [0u8; 1024];
28693        rng.fill_bytes(&mut buf);
28694        let mut unstructured = Unstructured::new(&buf);
28695        Self::arbitrary(&mut unstructured).unwrap_or_default()
28696    }
28697}
28698impl Default for SERIAL_UDB_EXTRA_F2_B_DATA {
28699    fn default() -> Self {
28700        Self::DEFAULT.clone()
28701    }
28702}
28703impl MessageData for SERIAL_UDB_EXTRA_F2_B_DATA {
28704    type Message = MavMessage;
28705    const ID: u32 = 171u32;
28706    const NAME: &'static str = "SERIAL_UDB_EXTRA_F2_B";
28707    const EXTRA_CRC: u8 = 245u8;
28708    const ENCODED_LEN: usize = 108usize;
28709    fn deser(
28710        _version: MavlinkVersion,
28711        __input: &[u8],
28712    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28713        let avail_len = __input.len();
28714        let mut payload_buf = [0; Self::ENCODED_LEN];
28715        let mut buf = if avail_len < Self::ENCODED_LEN {
28716            payload_buf[0..avail_len].copy_from_slice(__input);
28717            Bytes::new(&payload_buf)
28718        } else {
28719            Bytes::new(__input)
28720        };
28721        let mut __struct = Self::default();
28722        __struct.sue_time = buf.get_u32_le();
28723        __struct.sue_flags = buf.get_u32_le();
28724        __struct.sue_barom_press = buf.get_i32_le();
28725        __struct.sue_barom_alt = buf.get_i32_le();
28726        __struct.sue_pwm_input_1 = buf.get_i16_le();
28727        __struct.sue_pwm_input_2 = buf.get_i16_le();
28728        __struct.sue_pwm_input_3 = buf.get_i16_le();
28729        __struct.sue_pwm_input_4 = buf.get_i16_le();
28730        __struct.sue_pwm_input_5 = buf.get_i16_le();
28731        __struct.sue_pwm_input_6 = buf.get_i16_le();
28732        __struct.sue_pwm_input_7 = buf.get_i16_le();
28733        __struct.sue_pwm_input_8 = buf.get_i16_le();
28734        __struct.sue_pwm_input_9 = buf.get_i16_le();
28735        __struct.sue_pwm_input_10 = buf.get_i16_le();
28736        __struct.sue_pwm_input_11 = buf.get_i16_le();
28737        __struct.sue_pwm_input_12 = buf.get_i16_le();
28738        __struct.sue_pwm_output_1 = buf.get_i16_le();
28739        __struct.sue_pwm_output_2 = buf.get_i16_le();
28740        __struct.sue_pwm_output_3 = buf.get_i16_le();
28741        __struct.sue_pwm_output_4 = buf.get_i16_le();
28742        __struct.sue_pwm_output_5 = buf.get_i16_le();
28743        __struct.sue_pwm_output_6 = buf.get_i16_le();
28744        __struct.sue_pwm_output_7 = buf.get_i16_le();
28745        __struct.sue_pwm_output_8 = buf.get_i16_le();
28746        __struct.sue_pwm_output_9 = buf.get_i16_le();
28747        __struct.sue_pwm_output_10 = buf.get_i16_le();
28748        __struct.sue_pwm_output_11 = buf.get_i16_le();
28749        __struct.sue_pwm_output_12 = buf.get_i16_le();
28750        __struct.sue_imu_location_x = buf.get_i16_le();
28751        __struct.sue_imu_location_y = buf.get_i16_le();
28752        __struct.sue_imu_location_z = buf.get_i16_le();
28753        __struct.sue_location_error_earth_x = buf.get_i16_le();
28754        __struct.sue_location_error_earth_y = buf.get_i16_le();
28755        __struct.sue_location_error_earth_z = buf.get_i16_le();
28756        __struct.sue_osc_fails = buf.get_i16_le();
28757        __struct.sue_imu_velocity_x = buf.get_i16_le();
28758        __struct.sue_imu_velocity_y = buf.get_i16_le();
28759        __struct.sue_imu_velocity_z = buf.get_i16_le();
28760        __struct.sue_waypoint_goal_x = buf.get_i16_le();
28761        __struct.sue_waypoint_goal_y = buf.get_i16_le();
28762        __struct.sue_waypoint_goal_z = buf.get_i16_le();
28763        __struct.sue_aero_x = buf.get_i16_le();
28764        __struct.sue_aero_y = buf.get_i16_le();
28765        __struct.sue_aero_z = buf.get_i16_le();
28766        __struct.sue_barom_temp = buf.get_i16_le();
28767        __struct.sue_bat_volt = buf.get_i16_le();
28768        __struct.sue_bat_amp = buf.get_i16_le();
28769        __struct.sue_bat_amp_hours = buf.get_i16_le();
28770        __struct.sue_desired_height = buf.get_i16_le();
28771        __struct.sue_memory_stack_free = buf.get_i16_le();
28772        Ok(__struct)
28773    }
28774    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28775        let mut __tmp = BytesMut::new(bytes);
28776        #[allow(clippy::absurd_extreme_comparisons)]
28777        #[allow(unused_comparisons)]
28778        if __tmp.remaining() < Self::ENCODED_LEN {
28779            panic!(
28780                "buffer is too small (need {} bytes, but got {})",
28781                Self::ENCODED_LEN,
28782                __tmp.remaining(),
28783            )
28784        }
28785        __tmp.put_u32_le(self.sue_time);
28786        __tmp.put_u32_le(self.sue_flags);
28787        __tmp.put_i32_le(self.sue_barom_press);
28788        __tmp.put_i32_le(self.sue_barom_alt);
28789        __tmp.put_i16_le(self.sue_pwm_input_1);
28790        __tmp.put_i16_le(self.sue_pwm_input_2);
28791        __tmp.put_i16_le(self.sue_pwm_input_3);
28792        __tmp.put_i16_le(self.sue_pwm_input_4);
28793        __tmp.put_i16_le(self.sue_pwm_input_5);
28794        __tmp.put_i16_le(self.sue_pwm_input_6);
28795        __tmp.put_i16_le(self.sue_pwm_input_7);
28796        __tmp.put_i16_le(self.sue_pwm_input_8);
28797        __tmp.put_i16_le(self.sue_pwm_input_9);
28798        __tmp.put_i16_le(self.sue_pwm_input_10);
28799        __tmp.put_i16_le(self.sue_pwm_input_11);
28800        __tmp.put_i16_le(self.sue_pwm_input_12);
28801        __tmp.put_i16_le(self.sue_pwm_output_1);
28802        __tmp.put_i16_le(self.sue_pwm_output_2);
28803        __tmp.put_i16_le(self.sue_pwm_output_3);
28804        __tmp.put_i16_le(self.sue_pwm_output_4);
28805        __tmp.put_i16_le(self.sue_pwm_output_5);
28806        __tmp.put_i16_le(self.sue_pwm_output_6);
28807        __tmp.put_i16_le(self.sue_pwm_output_7);
28808        __tmp.put_i16_le(self.sue_pwm_output_8);
28809        __tmp.put_i16_le(self.sue_pwm_output_9);
28810        __tmp.put_i16_le(self.sue_pwm_output_10);
28811        __tmp.put_i16_le(self.sue_pwm_output_11);
28812        __tmp.put_i16_le(self.sue_pwm_output_12);
28813        __tmp.put_i16_le(self.sue_imu_location_x);
28814        __tmp.put_i16_le(self.sue_imu_location_y);
28815        __tmp.put_i16_le(self.sue_imu_location_z);
28816        __tmp.put_i16_le(self.sue_location_error_earth_x);
28817        __tmp.put_i16_le(self.sue_location_error_earth_y);
28818        __tmp.put_i16_le(self.sue_location_error_earth_z);
28819        __tmp.put_i16_le(self.sue_osc_fails);
28820        __tmp.put_i16_le(self.sue_imu_velocity_x);
28821        __tmp.put_i16_le(self.sue_imu_velocity_y);
28822        __tmp.put_i16_le(self.sue_imu_velocity_z);
28823        __tmp.put_i16_le(self.sue_waypoint_goal_x);
28824        __tmp.put_i16_le(self.sue_waypoint_goal_y);
28825        __tmp.put_i16_le(self.sue_waypoint_goal_z);
28826        __tmp.put_i16_le(self.sue_aero_x);
28827        __tmp.put_i16_le(self.sue_aero_y);
28828        __tmp.put_i16_le(self.sue_aero_z);
28829        __tmp.put_i16_le(self.sue_barom_temp);
28830        __tmp.put_i16_le(self.sue_bat_volt);
28831        __tmp.put_i16_le(self.sue_bat_amp);
28832        __tmp.put_i16_le(self.sue_bat_amp_hours);
28833        __tmp.put_i16_le(self.sue_desired_height);
28834        __tmp.put_i16_le(self.sue_memory_stack_free);
28835        if matches!(version, MavlinkVersion::V2) {
28836            let len = __tmp.len();
28837            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28838        } else {
28839            __tmp.len()
28840        }
28841    }
28842}
28843#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F4: format."]
28844#[doc = ""]
28845#[doc = "ID: 172"]
28846#[derive(Debug, Clone, PartialEq)]
28847#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28848#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28849pub struct SERIAL_UDB_EXTRA_F4_DATA {
28850    #[doc = "Serial UDB Extra Roll Stabilization with Ailerons Enabled"]
28851    pub sue_ROLL_STABILIZATION_AILERONS: u8,
28852    #[doc = "Serial UDB Extra Roll Stabilization with Rudder Enabled"]
28853    pub sue_ROLL_STABILIZATION_RUDDER: u8,
28854    #[doc = "Serial UDB Extra Pitch Stabilization Enabled"]
28855    pub sue_PITCH_STABILIZATION: u8,
28856    #[doc = "Serial UDB Extra Yaw Stabilization using Rudder Enabled"]
28857    pub sue_YAW_STABILIZATION_RUDDER: u8,
28858    #[doc = "Serial UDB Extra Yaw Stabilization using Ailerons Enabled"]
28859    pub sue_YAW_STABILIZATION_AILERON: u8,
28860    #[doc = "Serial UDB Extra Navigation with Ailerons Enabled"]
28861    pub sue_AILERON_NAVIGATION: u8,
28862    #[doc = "Serial UDB Extra Navigation with Rudder Enabled"]
28863    pub sue_RUDDER_NAVIGATION: u8,
28864    #[doc = "Serial UDB Extra Type of Alitude Hold when in Stabilized Mode"]
28865    pub sue_ALTITUDEHOLD_STABILIZED: u8,
28866    #[doc = "Serial UDB Extra Type of Alitude Hold when in Waypoint Mode"]
28867    pub sue_ALTITUDEHOLD_WAYPOINT: u8,
28868    #[doc = "Serial UDB Extra Firmware racing mode enabled"]
28869    pub sue_RACING_MODE: u8,
28870}
28871impl SERIAL_UDB_EXTRA_F4_DATA {
28872    pub const ENCODED_LEN: usize = 10usize;
28873    pub const DEFAULT: Self = Self {
28874        sue_ROLL_STABILIZATION_AILERONS: 0_u8,
28875        sue_ROLL_STABILIZATION_RUDDER: 0_u8,
28876        sue_PITCH_STABILIZATION: 0_u8,
28877        sue_YAW_STABILIZATION_RUDDER: 0_u8,
28878        sue_YAW_STABILIZATION_AILERON: 0_u8,
28879        sue_AILERON_NAVIGATION: 0_u8,
28880        sue_RUDDER_NAVIGATION: 0_u8,
28881        sue_ALTITUDEHOLD_STABILIZED: 0_u8,
28882        sue_ALTITUDEHOLD_WAYPOINT: 0_u8,
28883        sue_RACING_MODE: 0_u8,
28884    };
28885    #[cfg(feature = "arbitrary")]
28886    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28887        use arbitrary::{Arbitrary, Unstructured};
28888        let mut buf = [0u8; 1024];
28889        rng.fill_bytes(&mut buf);
28890        let mut unstructured = Unstructured::new(&buf);
28891        Self::arbitrary(&mut unstructured).unwrap_or_default()
28892    }
28893}
28894impl Default for SERIAL_UDB_EXTRA_F4_DATA {
28895    fn default() -> Self {
28896        Self::DEFAULT.clone()
28897    }
28898}
28899impl MessageData for SERIAL_UDB_EXTRA_F4_DATA {
28900    type Message = MavMessage;
28901    const ID: u32 = 172u32;
28902    const NAME: &'static str = "SERIAL_UDB_EXTRA_F4";
28903    const EXTRA_CRC: u8 = 191u8;
28904    const ENCODED_LEN: usize = 10usize;
28905    fn deser(
28906        _version: MavlinkVersion,
28907        __input: &[u8],
28908    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28909        let avail_len = __input.len();
28910        let mut payload_buf = [0; Self::ENCODED_LEN];
28911        let mut buf = if avail_len < Self::ENCODED_LEN {
28912            payload_buf[0..avail_len].copy_from_slice(__input);
28913            Bytes::new(&payload_buf)
28914        } else {
28915            Bytes::new(__input)
28916        };
28917        let mut __struct = Self::default();
28918        __struct.sue_ROLL_STABILIZATION_AILERONS = buf.get_u8();
28919        __struct.sue_ROLL_STABILIZATION_RUDDER = buf.get_u8();
28920        __struct.sue_PITCH_STABILIZATION = buf.get_u8();
28921        __struct.sue_YAW_STABILIZATION_RUDDER = buf.get_u8();
28922        __struct.sue_YAW_STABILIZATION_AILERON = buf.get_u8();
28923        __struct.sue_AILERON_NAVIGATION = buf.get_u8();
28924        __struct.sue_RUDDER_NAVIGATION = buf.get_u8();
28925        __struct.sue_ALTITUDEHOLD_STABILIZED = buf.get_u8();
28926        __struct.sue_ALTITUDEHOLD_WAYPOINT = buf.get_u8();
28927        __struct.sue_RACING_MODE = buf.get_u8();
28928        Ok(__struct)
28929    }
28930    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28931        let mut __tmp = BytesMut::new(bytes);
28932        #[allow(clippy::absurd_extreme_comparisons)]
28933        #[allow(unused_comparisons)]
28934        if __tmp.remaining() < Self::ENCODED_LEN {
28935            panic!(
28936                "buffer is too small (need {} bytes, but got {})",
28937                Self::ENCODED_LEN,
28938                __tmp.remaining(),
28939            )
28940        }
28941        __tmp.put_u8(self.sue_ROLL_STABILIZATION_AILERONS);
28942        __tmp.put_u8(self.sue_ROLL_STABILIZATION_RUDDER);
28943        __tmp.put_u8(self.sue_PITCH_STABILIZATION);
28944        __tmp.put_u8(self.sue_YAW_STABILIZATION_RUDDER);
28945        __tmp.put_u8(self.sue_YAW_STABILIZATION_AILERON);
28946        __tmp.put_u8(self.sue_AILERON_NAVIGATION);
28947        __tmp.put_u8(self.sue_RUDDER_NAVIGATION);
28948        __tmp.put_u8(self.sue_ALTITUDEHOLD_STABILIZED);
28949        __tmp.put_u8(self.sue_ALTITUDEHOLD_WAYPOINT);
28950        __tmp.put_u8(self.sue_RACING_MODE);
28951        if matches!(version, MavlinkVersion::V2) {
28952            let len = __tmp.len();
28953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28954        } else {
28955            __tmp.len()
28956        }
28957    }
28958}
28959#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F5: format."]
28960#[doc = ""]
28961#[doc = "ID: 173"]
28962#[derive(Debug, Clone, PartialEq)]
28963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28965pub struct SERIAL_UDB_EXTRA_F5_DATA {
28966    #[doc = "Serial UDB YAWKP_AILERON Gain for Proporional control of navigation"]
28967    pub sue_YAWKP_AILERON: f32,
28968    #[doc = "Serial UDB YAWKD_AILERON Gain for Rate control of navigation"]
28969    pub sue_YAWKD_AILERON: f32,
28970    #[doc = "Serial UDB Extra ROLLKP Gain for Proportional control of roll stabilization"]
28971    pub sue_ROLLKP: f32,
28972    #[doc = "Serial UDB Extra ROLLKD Gain for Rate control of roll stabilization"]
28973    pub sue_ROLLKD: f32,
28974}
28975impl SERIAL_UDB_EXTRA_F5_DATA {
28976    pub const ENCODED_LEN: usize = 16usize;
28977    pub const DEFAULT: Self = Self {
28978        sue_YAWKP_AILERON: 0.0_f32,
28979        sue_YAWKD_AILERON: 0.0_f32,
28980        sue_ROLLKP: 0.0_f32,
28981        sue_ROLLKD: 0.0_f32,
28982    };
28983    #[cfg(feature = "arbitrary")]
28984    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28985        use arbitrary::{Arbitrary, Unstructured};
28986        let mut buf = [0u8; 1024];
28987        rng.fill_bytes(&mut buf);
28988        let mut unstructured = Unstructured::new(&buf);
28989        Self::arbitrary(&mut unstructured).unwrap_or_default()
28990    }
28991}
28992impl Default for SERIAL_UDB_EXTRA_F5_DATA {
28993    fn default() -> Self {
28994        Self::DEFAULT.clone()
28995    }
28996}
28997impl MessageData for SERIAL_UDB_EXTRA_F5_DATA {
28998    type Message = MavMessage;
28999    const ID: u32 = 173u32;
29000    const NAME: &'static str = "SERIAL_UDB_EXTRA_F5";
29001    const EXTRA_CRC: u8 = 54u8;
29002    const ENCODED_LEN: usize = 16usize;
29003    fn deser(
29004        _version: MavlinkVersion,
29005        __input: &[u8],
29006    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29007        let avail_len = __input.len();
29008        let mut payload_buf = [0; Self::ENCODED_LEN];
29009        let mut buf = if avail_len < Self::ENCODED_LEN {
29010            payload_buf[0..avail_len].copy_from_slice(__input);
29011            Bytes::new(&payload_buf)
29012        } else {
29013            Bytes::new(__input)
29014        };
29015        let mut __struct = Self::default();
29016        __struct.sue_YAWKP_AILERON = buf.get_f32_le();
29017        __struct.sue_YAWKD_AILERON = buf.get_f32_le();
29018        __struct.sue_ROLLKP = buf.get_f32_le();
29019        __struct.sue_ROLLKD = buf.get_f32_le();
29020        Ok(__struct)
29021    }
29022    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29023        let mut __tmp = BytesMut::new(bytes);
29024        #[allow(clippy::absurd_extreme_comparisons)]
29025        #[allow(unused_comparisons)]
29026        if __tmp.remaining() < Self::ENCODED_LEN {
29027            panic!(
29028                "buffer is too small (need {} bytes, but got {})",
29029                Self::ENCODED_LEN,
29030                __tmp.remaining(),
29031            )
29032        }
29033        __tmp.put_f32_le(self.sue_YAWKP_AILERON);
29034        __tmp.put_f32_le(self.sue_YAWKD_AILERON);
29035        __tmp.put_f32_le(self.sue_ROLLKP);
29036        __tmp.put_f32_le(self.sue_ROLLKD);
29037        if matches!(version, MavlinkVersion::V2) {
29038            let len = __tmp.len();
29039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29040        } else {
29041            __tmp.len()
29042        }
29043    }
29044}
29045#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F6: format."]
29046#[doc = ""]
29047#[doc = "ID: 174"]
29048#[derive(Debug, Clone, PartialEq)]
29049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29051pub struct SERIAL_UDB_EXTRA_F6_DATA {
29052    #[doc = "Serial UDB Extra PITCHGAIN Proportional Control"]
29053    pub sue_PITCHGAIN: f32,
29054    #[doc = "Serial UDB Extra Pitch Rate Control"]
29055    pub sue_PITCHKD: f32,
29056    #[doc = "Serial UDB Extra Rudder to Elevator Mix"]
29057    pub sue_RUDDER_ELEV_MIX: f32,
29058    #[doc = "Serial UDB Extra Roll to Elevator Mix"]
29059    pub sue_ROLL_ELEV_MIX: f32,
29060    #[doc = "Gain For Boosting Manual Elevator control When Plane Stabilized"]
29061    pub sue_ELEVATOR_BOOST: f32,
29062}
29063impl SERIAL_UDB_EXTRA_F6_DATA {
29064    pub const ENCODED_LEN: usize = 20usize;
29065    pub const DEFAULT: Self = Self {
29066        sue_PITCHGAIN: 0.0_f32,
29067        sue_PITCHKD: 0.0_f32,
29068        sue_RUDDER_ELEV_MIX: 0.0_f32,
29069        sue_ROLL_ELEV_MIX: 0.0_f32,
29070        sue_ELEVATOR_BOOST: 0.0_f32,
29071    };
29072    #[cfg(feature = "arbitrary")]
29073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29074        use arbitrary::{Arbitrary, Unstructured};
29075        let mut buf = [0u8; 1024];
29076        rng.fill_bytes(&mut buf);
29077        let mut unstructured = Unstructured::new(&buf);
29078        Self::arbitrary(&mut unstructured).unwrap_or_default()
29079    }
29080}
29081impl Default for SERIAL_UDB_EXTRA_F6_DATA {
29082    fn default() -> Self {
29083        Self::DEFAULT.clone()
29084    }
29085}
29086impl MessageData for SERIAL_UDB_EXTRA_F6_DATA {
29087    type Message = MavMessage;
29088    const ID: u32 = 174u32;
29089    const NAME: &'static str = "SERIAL_UDB_EXTRA_F6";
29090    const EXTRA_CRC: u8 = 54u8;
29091    const ENCODED_LEN: usize = 20usize;
29092    fn deser(
29093        _version: MavlinkVersion,
29094        __input: &[u8],
29095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29096        let avail_len = __input.len();
29097        let mut payload_buf = [0; Self::ENCODED_LEN];
29098        let mut buf = if avail_len < Self::ENCODED_LEN {
29099            payload_buf[0..avail_len].copy_from_slice(__input);
29100            Bytes::new(&payload_buf)
29101        } else {
29102            Bytes::new(__input)
29103        };
29104        let mut __struct = Self::default();
29105        __struct.sue_PITCHGAIN = buf.get_f32_le();
29106        __struct.sue_PITCHKD = buf.get_f32_le();
29107        __struct.sue_RUDDER_ELEV_MIX = buf.get_f32_le();
29108        __struct.sue_ROLL_ELEV_MIX = buf.get_f32_le();
29109        __struct.sue_ELEVATOR_BOOST = buf.get_f32_le();
29110        Ok(__struct)
29111    }
29112    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29113        let mut __tmp = BytesMut::new(bytes);
29114        #[allow(clippy::absurd_extreme_comparisons)]
29115        #[allow(unused_comparisons)]
29116        if __tmp.remaining() < Self::ENCODED_LEN {
29117            panic!(
29118                "buffer is too small (need {} bytes, but got {})",
29119                Self::ENCODED_LEN,
29120                __tmp.remaining(),
29121            )
29122        }
29123        __tmp.put_f32_le(self.sue_PITCHGAIN);
29124        __tmp.put_f32_le(self.sue_PITCHKD);
29125        __tmp.put_f32_le(self.sue_RUDDER_ELEV_MIX);
29126        __tmp.put_f32_le(self.sue_ROLL_ELEV_MIX);
29127        __tmp.put_f32_le(self.sue_ELEVATOR_BOOST);
29128        if matches!(version, MavlinkVersion::V2) {
29129            let len = __tmp.len();
29130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29131        } else {
29132            __tmp.len()
29133        }
29134    }
29135}
29136#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F7: format."]
29137#[doc = ""]
29138#[doc = "ID: 175"]
29139#[derive(Debug, Clone, PartialEq)]
29140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29142pub struct SERIAL_UDB_EXTRA_F7_DATA {
29143    #[doc = "Serial UDB YAWKP_RUDDER Gain for Proporional control of navigation"]
29144    pub sue_YAWKP_RUDDER: f32,
29145    #[doc = "Serial UDB YAWKD_RUDDER Gain for Rate control of navigation"]
29146    pub sue_YAWKD_RUDDER: f32,
29147    #[doc = "Serial UDB Extra ROLLKP_RUDDER Gain for Proportional control of roll stabilization"]
29148    pub sue_ROLLKP_RUDDER: f32,
29149    #[doc = "Serial UDB Extra ROLLKD_RUDDER Gain for Rate control of roll stabilization"]
29150    pub sue_ROLLKD_RUDDER: f32,
29151    #[doc = "SERIAL UDB EXTRA Rudder Boost Gain to Manual Control when stabilized"]
29152    pub sue_RUDDER_BOOST: f32,
29153    #[doc = "Serial UDB Extra Return To Landing - Angle to Pitch Plane Down"]
29154    pub sue_RTL_PITCH_DOWN: f32,
29155}
29156impl SERIAL_UDB_EXTRA_F7_DATA {
29157    pub const ENCODED_LEN: usize = 24usize;
29158    pub const DEFAULT: Self = Self {
29159        sue_YAWKP_RUDDER: 0.0_f32,
29160        sue_YAWKD_RUDDER: 0.0_f32,
29161        sue_ROLLKP_RUDDER: 0.0_f32,
29162        sue_ROLLKD_RUDDER: 0.0_f32,
29163        sue_RUDDER_BOOST: 0.0_f32,
29164        sue_RTL_PITCH_DOWN: 0.0_f32,
29165    };
29166    #[cfg(feature = "arbitrary")]
29167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29168        use arbitrary::{Arbitrary, Unstructured};
29169        let mut buf = [0u8; 1024];
29170        rng.fill_bytes(&mut buf);
29171        let mut unstructured = Unstructured::new(&buf);
29172        Self::arbitrary(&mut unstructured).unwrap_or_default()
29173    }
29174}
29175impl Default for SERIAL_UDB_EXTRA_F7_DATA {
29176    fn default() -> Self {
29177        Self::DEFAULT.clone()
29178    }
29179}
29180impl MessageData for SERIAL_UDB_EXTRA_F7_DATA {
29181    type Message = MavMessage;
29182    const ID: u32 = 175u32;
29183    const NAME: &'static str = "SERIAL_UDB_EXTRA_F7";
29184    const EXTRA_CRC: u8 = 171u8;
29185    const ENCODED_LEN: usize = 24usize;
29186    fn deser(
29187        _version: MavlinkVersion,
29188        __input: &[u8],
29189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29190        let avail_len = __input.len();
29191        let mut payload_buf = [0; Self::ENCODED_LEN];
29192        let mut buf = if avail_len < Self::ENCODED_LEN {
29193            payload_buf[0..avail_len].copy_from_slice(__input);
29194            Bytes::new(&payload_buf)
29195        } else {
29196            Bytes::new(__input)
29197        };
29198        let mut __struct = Self::default();
29199        __struct.sue_YAWKP_RUDDER = buf.get_f32_le();
29200        __struct.sue_YAWKD_RUDDER = buf.get_f32_le();
29201        __struct.sue_ROLLKP_RUDDER = buf.get_f32_le();
29202        __struct.sue_ROLLKD_RUDDER = buf.get_f32_le();
29203        __struct.sue_RUDDER_BOOST = buf.get_f32_le();
29204        __struct.sue_RTL_PITCH_DOWN = buf.get_f32_le();
29205        Ok(__struct)
29206    }
29207    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29208        let mut __tmp = BytesMut::new(bytes);
29209        #[allow(clippy::absurd_extreme_comparisons)]
29210        #[allow(unused_comparisons)]
29211        if __tmp.remaining() < Self::ENCODED_LEN {
29212            panic!(
29213                "buffer is too small (need {} bytes, but got {})",
29214                Self::ENCODED_LEN,
29215                __tmp.remaining(),
29216            )
29217        }
29218        __tmp.put_f32_le(self.sue_YAWKP_RUDDER);
29219        __tmp.put_f32_le(self.sue_YAWKD_RUDDER);
29220        __tmp.put_f32_le(self.sue_ROLLKP_RUDDER);
29221        __tmp.put_f32_le(self.sue_ROLLKD_RUDDER);
29222        __tmp.put_f32_le(self.sue_RUDDER_BOOST);
29223        __tmp.put_f32_le(self.sue_RTL_PITCH_DOWN);
29224        if matches!(version, MavlinkVersion::V2) {
29225            let len = __tmp.len();
29226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29227        } else {
29228            __tmp.len()
29229        }
29230    }
29231}
29232#[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F8: format."]
29233#[doc = ""]
29234#[doc = "ID: 176"]
29235#[derive(Debug, Clone, PartialEq)]
29236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29238pub struct SERIAL_UDB_EXTRA_F8_DATA {
29239    #[doc = "Serial UDB Extra HEIGHT_TARGET_MAX"]
29240    pub sue_HEIGHT_TARGET_MAX: f32,
29241    #[doc = "Serial UDB Extra HEIGHT_TARGET_MIN"]
29242    pub sue_HEIGHT_TARGET_MIN: f32,
29243    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MIN"]
29244    pub sue_ALT_HOLD_THROTTLE_MIN: f32,
29245    #[doc = "Serial UDB Extra ALT_HOLD_THROTTLE_MAX"]
29246    pub sue_ALT_HOLD_THROTTLE_MAX: f32,
29247    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MIN"]
29248    pub sue_ALT_HOLD_PITCH_MIN: f32,
29249    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_MAX"]
29250    pub sue_ALT_HOLD_PITCH_MAX: f32,
29251    #[doc = "Serial UDB Extra ALT_HOLD_PITCH_HIGH"]
29252    pub sue_ALT_HOLD_PITCH_HIGH: f32,
29253}
29254impl SERIAL_UDB_EXTRA_F8_DATA {
29255    pub const ENCODED_LEN: usize = 28usize;
29256    pub const DEFAULT: Self = Self {
29257        sue_HEIGHT_TARGET_MAX: 0.0_f32,
29258        sue_HEIGHT_TARGET_MIN: 0.0_f32,
29259        sue_ALT_HOLD_THROTTLE_MIN: 0.0_f32,
29260        sue_ALT_HOLD_THROTTLE_MAX: 0.0_f32,
29261        sue_ALT_HOLD_PITCH_MIN: 0.0_f32,
29262        sue_ALT_HOLD_PITCH_MAX: 0.0_f32,
29263        sue_ALT_HOLD_PITCH_HIGH: 0.0_f32,
29264    };
29265    #[cfg(feature = "arbitrary")]
29266    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29267        use arbitrary::{Arbitrary, Unstructured};
29268        let mut buf = [0u8; 1024];
29269        rng.fill_bytes(&mut buf);
29270        let mut unstructured = Unstructured::new(&buf);
29271        Self::arbitrary(&mut unstructured).unwrap_or_default()
29272    }
29273}
29274impl Default for SERIAL_UDB_EXTRA_F8_DATA {
29275    fn default() -> Self {
29276        Self::DEFAULT.clone()
29277    }
29278}
29279impl MessageData for SERIAL_UDB_EXTRA_F8_DATA {
29280    type Message = MavMessage;
29281    const ID: u32 = 176u32;
29282    const NAME: &'static str = "SERIAL_UDB_EXTRA_F8";
29283    const EXTRA_CRC: u8 = 142u8;
29284    const ENCODED_LEN: usize = 28usize;
29285    fn deser(
29286        _version: MavlinkVersion,
29287        __input: &[u8],
29288    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29289        let avail_len = __input.len();
29290        let mut payload_buf = [0; Self::ENCODED_LEN];
29291        let mut buf = if avail_len < Self::ENCODED_LEN {
29292            payload_buf[0..avail_len].copy_from_slice(__input);
29293            Bytes::new(&payload_buf)
29294        } else {
29295            Bytes::new(__input)
29296        };
29297        let mut __struct = Self::default();
29298        __struct.sue_HEIGHT_TARGET_MAX = buf.get_f32_le();
29299        __struct.sue_HEIGHT_TARGET_MIN = buf.get_f32_le();
29300        __struct.sue_ALT_HOLD_THROTTLE_MIN = buf.get_f32_le();
29301        __struct.sue_ALT_HOLD_THROTTLE_MAX = buf.get_f32_le();
29302        __struct.sue_ALT_HOLD_PITCH_MIN = buf.get_f32_le();
29303        __struct.sue_ALT_HOLD_PITCH_MAX = buf.get_f32_le();
29304        __struct.sue_ALT_HOLD_PITCH_HIGH = buf.get_f32_le();
29305        Ok(__struct)
29306    }
29307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29308        let mut __tmp = BytesMut::new(bytes);
29309        #[allow(clippy::absurd_extreme_comparisons)]
29310        #[allow(unused_comparisons)]
29311        if __tmp.remaining() < Self::ENCODED_LEN {
29312            panic!(
29313                "buffer is too small (need {} bytes, but got {})",
29314                Self::ENCODED_LEN,
29315                __tmp.remaining(),
29316            )
29317        }
29318        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MAX);
29319        __tmp.put_f32_le(self.sue_HEIGHT_TARGET_MIN);
29320        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MIN);
29321        __tmp.put_f32_le(self.sue_ALT_HOLD_THROTTLE_MAX);
29322        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MIN);
29323        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_MAX);
29324        __tmp.put_f32_le(self.sue_ALT_HOLD_PITCH_HIGH);
29325        if matches!(version, MavlinkVersion::V2) {
29326            let len = __tmp.len();
29327            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29328        } else {
29329            __tmp.len()
29330        }
29331    }
29332}
29333#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
29334#[doc = ""]
29335#[doc = "ID: 36"]
29336#[derive(Debug, Clone, PartialEq)]
29337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29338#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29339pub struct SERVO_OUTPUT_RAW_DATA {
29340    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29341    pub time_usec: u32,
29342    #[doc = "Servo output 1 value"]
29343    pub servo1_raw: u16,
29344    #[doc = "Servo output 2 value"]
29345    pub servo2_raw: u16,
29346    #[doc = "Servo output 3 value"]
29347    pub servo3_raw: u16,
29348    #[doc = "Servo output 4 value"]
29349    pub servo4_raw: u16,
29350    #[doc = "Servo output 5 value"]
29351    pub servo5_raw: u16,
29352    #[doc = "Servo output 6 value"]
29353    pub servo6_raw: u16,
29354    #[doc = "Servo output 7 value"]
29355    pub servo7_raw: u16,
29356    #[doc = "Servo output 8 value"]
29357    pub servo8_raw: u16,
29358    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
29359    pub port: u8,
29360    #[doc = "Servo output 9 value"]
29361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29362    pub servo9_raw: u16,
29363    #[doc = "Servo output 10 value"]
29364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29365    pub servo10_raw: u16,
29366    #[doc = "Servo output 11 value"]
29367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29368    pub servo11_raw: u16,
29369    #[doc = "Servo output 12 value"]
29370    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29371    pub servo12_raw: u16,
29372    #[doc = "Servo output 13 value"]
29373    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29374    pub servo13_raw: u16,
29375    #[doc = "Servo output 14 value"]
29376    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29377    pub servo14_raw: u16,
29378    #[doc = "Servo output 15 value"]
29379    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29380    pub servo15_raw: u16,
29381    #[doc = "Servo output 16 value"]
29382    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29383    pub servo16_raw: u16,
29384}
29385impl SERVO_OUTPUT_RAW_DATA {
29386    pub const ENCODED_LEN: usize = 37usize;
29387    pub const DEFAULT: Self = Self {
29388        time_usec: 0_u32,
29389        servo1_raw: 0_u16,
29390        servo2_raw: 0_u16,
29391        servo3_raw: 0_u16,
29392        servo4_raw: 0_u16,
29393        servo5_raw: 0_u16,
29394        servo6_raw: 0_u16,
29395        servo7_raw: 0_u16,
29396        servo8_raw: 0_u16,
29397        port: 0_u8,
29398        servo9_raw: 0_u16,
29399        servo10_raw: 0_u16,
29400        servo11_raw: 0_u16,
29401        servo12_raw: 0_u16,
29402        servo13_raw: 0_u16,
29403        servo14_raw: 0_u16,
29404        servo15_raw: 0_u16,
29405        servo16_raw: 0_u16,
29406    };
29407    #[cfg(feature = "arbitrary")]
29408    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29409        use arbitrary::{Arbitrary, Unstructured};
29410        let mut buf = [0u8; 1024];
29411        rng.fill_bytes(&mut buf);
29412        let mut unstructured = Unstructured::new(&buf);
29413        Self::arbitrary(&mut unstructured).unwrap_or_default()
29414    }
29415}
29416impl Default for SERVO_OUTPUT_RAW_DATA {
29417    fn default() -> Self {
29418        Self::DEFAULT.clone()
29419    }
29420}
29421impl MessageData for SERVO_OUTPUT_RAW_DATA {
29422    type Message = MavMessage;
29423    const ID: u32 = 36u32;
29424    const NAME: &'static str = "SERVO_OUTPUT_RAW";
29425    const EXTRA_CRC: u8 = 222u8;
29426    const ENCODED_LEN: usize = 37usize;
29427    fn deser(
29428        _version: MavlinkVersion,
29429        __input: &[u8],
29430    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29431        let avail_len = __input.len();
29432        let mut payload_buf = [0; Self::ENCODED_LEN];
29433        let mut buf = if avail_len < Self::ENCODED_LEN {
29434            payload_buf[0..avail_len].copy_from_slice(__input);
29435            Bytes::new(&payload_buf)
29436        } else {
29437            Bytes::new(__input)
29438        };
29439        let mut __struct = Self::default();
29440        __struct.time_usec = buf.get_u32_le();
29441        __struct.servo1_raw = buf.get_u16_le();
29442        __struct.servo2_raw = buf.get_u16_le();
29443        __struct.servo3_raw = buf.get_u16_le();
29444        __struct.servo4_raw = buf.get_u16_le();
29445        __struct.servo5_raw = buf.get_u16_le();
29446        __struct.servo6_raw = buf.get_u16_le();
29447        __struct.servo7_raw = buf.get_u16_le();
29448        __struct.servo8_raw = buf.get_u16_le();
29449        __struct.port = buf.get_u8();
29450        __struct.servo9_raw = buf.get_u16_le();
29451        __struct.servo10_raw = buf.get_u16_le();
29452        __struct.servo11_raw = buf.get_u16_le();
29453        __struct.servo12_raw = buf.get_u16_le();
29454        __struct.servo13_raw = buf.get_u16_le();
29455        __struct.servo14_raw = buf.get_u16_le();
29456        __struct.servo15_raw = buf.get_u16_le();
29457        __struct.servo16_raw = buf.get_u16_le();
29458        Ok(__struct)
29459    }
29460    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29461        let mut __tmp = BytesMut::new(bytes);
29462        #[allow(clippy::absurd_extreme_comparisons)]
29463        #[allow(unused_comparisons)]
29464        if __tmp.remaining() < Self::ENCODED_LEN {
29465            panic!(
29466                "buffer is too small (need {} bytes, but got {})",
29467                Self::ENCODED_LEN,
29468                __tmp.remaining(),
29469            )
29470        }
29471        __tmp.put_u32_le(self.time_usec);
29472        __tmp.put_u16_le(self.servo1_raw);
29473        __tmp.put_u16_le(self.servo2_raw);
29474        __tmp.put_u16_le(self.servo3_raw);
29475        __tmp.put_u16_le(self.servo4_raw);
29476        __tmp.put_u16_le(self.servo5_raw);
29477        __tmp.put_u16_le(self.servo6_raw);
29478        __tmp.put_u16_le(self.servo7_raw);
29479        __tmp.put_u16_le(self.servo8_raw);
29480        __tmp.put_u8(self.port);
29481        __tmp.put_u16_le(self.servo9_raw);
29482        __tmp.put_u16_le(self.servo10_raw);
29483        __tmp.put_u16_le(self.servo11_raw);
29484        __tmp.put_u16_le(self.servo12_raw);
29485        __tmp.put_u16_le(self.servo13_raw);
29486        __tmp.put_u16_le(self.servo14_raw);
29487        __tmp.put_u16_le(self.servo15_raw);
29488        __tmp.put_u16_le(self.servo16_raw);
29489        if matches!(version, MavlinkVersion::V2) {
29490            let len = __tmp.len();
29491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29492        } else {
29493            __tmp.len()
29494        }
29495    }
29496}
29497#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
29498#[doc = ""]
29499#[doc = "ID: 256"]
29500#[derive(Debug, Clone, PartialEq)]
29501#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29502#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29503pub struct SETUP_SIGNING_DATA {
29504    #[doc = "initial timestamp"]
29505    pub initial_timestamp: u64,
29506    #[doc = "system id of the target"]
29507    pub target_system: u8,
29508    #[doc = "component ID of the target"]
29509    pub target_component: u8,
29510    #[doc = "signing key"]
29511    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29512    pub secret_key: [u8; 32],
29513}
29514impl SETUP_SIGNING_DATA {
29515    pub const ENCODED_LEN: usize = 42usize;
29516    pub const DEFAULT: Self = Self {
29517        initial_timestamp: 0_u64,
29518        target_system: 0_u8,
29519        target_component: 0_u8,
29520        secret_key: [0_u8; 32usize],
29521    };
29522    #[cfg(feature = "arbitrary")]
29523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29524        use arbitrary::{Arbitrary, Unstructured};
29525        let mut buf = [0u8; 1024];
29526        rng.fill_bytes(&mut buf);
29527        let mut unstructured = Unstructured::new(&buf);
29528        Self::arbitrary(&mut unstructured).unwrap_or_default()
29529    }
29530}
29531impl Default for SETUP_SIGNING_DATA {
29532    fn default() -> Self {
29533        Self::DEFAULT.clone()
29534    }
29535}
29536impl MessageData for SETUP_SIGNING_DATA {
29537    type Message = MavMessage;
29538    const ID: u32 = 256u32;
29539    const NAME: &'static str = "SETUP_SIGNING";
29540    const EXTRA_CRC: u8 = 71u8;
29541    const ENCODED_LEN: usize = 42usize;
29542    fn deser(
29543        _version: MavlinkVersion,
29544        __input: &[u8],
29545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29546        let avail_len = __input.len();
29547        let mut payload_buf = [0; Self::ENCODED_LEN];
29548        let mut buf = if avail_len < Self::ENCODED_LEN {
29549            payload_buf[0..avail_len].copy_from_slice(__input);
29550            Bytes::new(&payload_buf)
29551        } else {
29552            Bytes::new(__input)
29553        };
29554        let mut __struct = Self::default();
29555        __struct.initial_timestamp = buf.get_u64_le();
29556        __struct.target_system = buf.get_u8();
29557        __struct.target_component = buf.get_u8();
29558        for v in &mut __struct.secret_key {
29559            let val = buf.get_u8();
29560            *v = val;
29561        }
29562        Ok(__struct)
29563    }
29564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29565        let mut __tmp = BytesMut::new(bytes);
29566        #[allow(clippy::absurd_extreme_comparisons)]
29567        #[allow(unused_comparisons)]
29568        if __tmp.remaining() < Self::ENCODED_LEN {
29569            panic!(
29570                "buffer is too small (need {} bytes, but got {})",
29571                Self::ENCODED_LEN,
29572                __tmp.remaining(),
29573            )
29574        }
29575        __tmp.put_u64_le(self.initial_timestamp);
29576        __tmp.put_u8(self.target_system);
29577        __tmp.put_u8(self.target_component);
29578        for val in &self.secret_key {
29579            __tmp.put_u8(*val);
29580        }
29581        if matches!(version, MavlinkVersion::V2) {
29582            let len = __tmp.len();
29583            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29584        } else {
29585            __tmp.len()
29586        }
29587    }
29588}
29589#[doc = "Set the vehicle attitude and body angular rates."]
29590#[doc = ""]
29591#[doc = "ID: 139"]
29592#[derive(Debug, Clone, PartialEq)]
29593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29595pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
29596    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29597    pub time_usec: u64,
29598    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
29599    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29600    pub controls: [f32; 8],
29601    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
29602    pub group_mlx: u8,
29603    #[doc = "System ID"]
29604    pub target_system: u8,
29605    #[doc = "Component ID"]
29606    pub target_component: u8,
29607}
29608impl SET_ACTUATOR_CONTROL_TARGET_DATA {
29609    pub const ENCODED_LEN: usize = 43usize;
29610    pub const DEFAULT: Self = Self {
29611        time_usec: 0_u64,
29612        controls: [0.0_f32; 8usize],
29613        group_mlx: 0_u8,
29614        target_system: 0_u8,
29615        target_component: 0_u8,
29616    };
29617    #[cfg(feature = "arbitrary")]
29618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29619        use arbitrary::{Arbitrary, Unstructured};
29620        let mut buf = [0u8; 1024];
29621        rng.fill_bytes(&mut buf);
29622        let mut unstructured = Unstructured::new(&buf);
29623        Self::arbitrary(&mut unstructured).unwrap_or_default()
29624    }
29625}
29626impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
29627    fn default() -> Self {
29628        Self::DEFAULT.clone()
29629    }
29630}
29631impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
29632    type Message = MavMessage;
29633    const ID: u32 = 139u32;
29634    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
29635    const EXTRA_CRC: u8 = 168u8;
29636    const ENCODED_LEN: usize = 43usize;
29637    fn deser(
29638        _version: MavlinkVersion,
29639        __input: &[u8],
29640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29641        let avail_len = __input.len();
29642        let mut payload_buf = [0; Self::ENCODED_LEN];
29643        let mut buf = if avail_len < Self::ENCODED_LEN {
29644            payload_buf[0..avail_len].copy_from_slice(__input);
29645            Bytes::new(&payload_buf)
29646        } else {
29647            Bytes::new(__input)
29648        };
29649        let mut __struct = Self::default();
29650        __struct.time_usec = buf.get_u64_le();
29651        for v in &mut __struct.controls {
29652            let val = buf.get_f32_le();
29653            *v = val;
29654        }
29655        __struct.group_mlx = buf.get_u8();
29656        __struct.target_system = buf.get_u8();
29657        __struct.target_component = buf.get_u8();
29658        Ok(__struct)
29659    }
29660    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29661        let mut __tmp = BytesMut::new(bytes);
29662        #[allow(clippy::absurd_extreme_comparisons)]
29663        #[allow(unused_comparisons)]
29664        if __tmp.remaining() < Self::ENCODED_LEN {
29665            panic!(
29666                "buffer is too small (need {} bytes, but got {})",
29667                Self::ENCODED_LEN,
29668                __tmp.remaining(),
29669            )
29670        }
29671        __tmp.put_u64_le(self.time_usec);
29672        for val in &self.controls {
29673            __tmp.put_f32_le(*val);
29674        }
29675        __tmp.put_u8(self.group_mlx);
29676        __tmp.put_u8(self.target_system);
29677        __tmp.put_u8(self.target_component);
29678        if matches!(version, MavlinkVersion::V2) {
29679            let len = __tmp.len();
29680            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29681        } else {
29682            __tmp.len()
29683        }
29684    }
29685}
29686#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
29687#[doc = ""]
29688#[doc = "ID: 82"]
29689#[derive(Debug, Clone, PartialEq)]
29690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29692pub struct SET_ATTITUDE_TARGET_DATA {
29693    #[doc = "Timestamp (time since system boot)."]
29694    pub time_boot_ms: u32,
29695    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
29696    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29697    pub q: [f32; 4],
29698    #[doc = "Body roll rate"]
29699    pub body_roll_rate: f32,
29700    #[doc = "Body pitch rate"]
29701    pub body_pitch_rate: f32,
29702    #[doc = "Body yaw rate"]
29703    pub body_yaw_rate: f32,
29704    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
29705    pub thrust: f32,
29706    #[doc = "System ID"]
29707    pub target_system: u8,
29708    #[doc = "Component ID"]
29709    pub target_component: u8,
29710    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
29711    pub type_mask: AttitudeTargetTypemask,
29712    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
29713    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29714    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29715    pub thrust_body: [f32; 3],
29716}
29717impl SET_ATTITUDE_TARGET_DATA {
29718    pub const ENCODED_LEN: usize = 51usize;
29719    pub const DEFAULT: Self = Self {
29720        time_boot_ms: 0_u32,
29721        q: [0.0_f32; 4usize],
29722        body_roll_rate: 0.0_f32,
29723        body_pitch_rate: 0.0_f32,
29724        body_yaw_rate: 0.0_f32,
29725        thrust: 0.0_f32,
29726        target_system: 0_u8,
29727        target_component: 0_u8,
29728        type_mask: AttitudeTargetTypemask::DEFAULT,
29729        thrust_body: [0.0_f32; 3usize],
29730    };
29731    #[cfg(feature = "arbitrary")]
29732    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29733        use arbitrary::{Arbitrary, Unstructured};
29734        let mut buf = [0u8; 1024];
29735        rng.fill_bytes(&mut buf);
29736        let mut unstructured = Unstructured::new(&buf);
29737        Self::arbitrary(&mut unstructured).unwrap_or_default()
29738    }
29739}
29740impl Default for SET_ATTITUDE_TARGET_DATA {
29741    fn default() -> Self {
29742        Self::DEFAULT.clone()
29743    }
29744}
29745impl MessageData for SET_ATTITUDE_TARGET_DATA {
29746    type Message = MavMessage;
29747    const ID: u32 = 82u32;
29748    const NAME: &'static str = "SET_ATTITUDE_TARGET";
29749    const EXTRA_CRC: u8 = 49u8;
29750    const ENCODED_LEN: usize = 51usize;
29751    fn deser(
29752        _version: MavlinkVersion,
29753        __input: &[u8],
29754    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29755        let avail_len = __input.len();
29756        let mut payload_buf = [0; Self::ENCODED_LEN];
29757        let mut buf = if avail_len < Self::ENCODED_LEN {
29758            payload_buf[0..avail_len].copy_from_slice(__input);
29759            Bytes::new(&payload_buf)
29760        } else {
29761            Bytes::new(__input)
29762        };
29763        let mut __struct = Self::default();
29764        __struct.time_boot_ms = buf.get_u32_le();
29765        for v in &mut __struct.q {
29766            let val = buf.get_f32_le();
29767            *v = val;
29768        }
29769        __struct.body_roll_rate = buf.get_f32_le();
29770        __struct.body_pitch_rate = buf.get_f32_le();
29771        __struct.body_yaw_rate = buf.get_f32_le();
29772        __struct.thrust = buf.get_f32_le();
29773        __struct.target_system = buf.get_u8();
29774        __struct.target_component = buf.get_u8();
29775        let tmp = buf.get_u8();
29776        __struct.type_mask = AttitudeTargetTypemask::from_bits(
29777            tmp & AttitudeTargetTypemask::all().bits(),
29778        )
29779        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29780            flag_type: "AttitudeTargetTypemask",
29781            value: tmp as u32,
29782        })?;
29783        for v in &mut __struct.thrust_body {
29784            let val = buf.get_f32_le();
29785            *v = val;
29786        }
29787        Ok(__struct)
29788    }
29789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29790        let mut __tmp = BytesMut::new(bytes);
29791        #[allow(clippy::absurd_extreme_comparisons)]
29792        #[allow(unused_comparisons)]
29793        if __tmp.remaining() < Self::ENCODED_LEN {
29794            panic!(
29795                "buffer is too small (need {} bytes, but got {})",
29796                Self::ENCODED_LEN,
29797                __tmp.remaining(),
29798            )
29799        }
29800        __tmp.put_u32_le(self.time_boot_ms);
29801        for val in &self.q {
29802            __tmp.put_f32_le(*val);
29803        }
29804        __tmp.put_f32_le(self.body_roll_rate);
29805        __tmp.put_f32_le(self.body_pitch_rate);
29806        __tmp.put_f32_le(self.body_yaw_rate);
29807        __tmp.put_f32_le(self.thrust);
29808        __tmp.put_u8(self.target_system);
29809        __tmp.put_u8(self.target_component);
29810        __tmp.put_u8(self.type_mask.bits());
29811        for val in &self.thrust_body {
29812            __tmp.put_f32_le(*val);
29813        }
29814        if matches!(version, MavlinkVersion::V2) {
29815            let len = __tmp.len();
29816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29817        } else {
29818            __tmp.len()
29819        }
29820    }
29821}
29822#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
29823#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
29824#[doc = ""]
29825#[doc = "ID: 48"]
29826#[derive(Debug, Clone, PartialEq)]
29827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29829pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
29830    #[doc = "Latitude (WGS84)"]
29831    pub latitude: i32,
29832    #[doc = "Longitude (WGS84)"]
29833    pub longitude: i32,
29834    #[doc = "Altitude (MSL). Positive for up."]
29835    pub altitude: i32,
29836    #[doc = "System ID"]
29837    pub target_system: u8,
29838    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29839    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29840    pub time_usec: u64,
29841}
29842impl SET_GPS_GLOBAL_ORIGIN_DATA {
29843    pub const ENCODED_LEN: usize = 21usize;
29844    pub const DEFAULT: Self = Self {
29845        latitude: 0_i32,
29846        longitude: 0_i32,
29847        altitude: 0_i32,
29848        target_system: 0_u8,
29849        time_usec: 0_u64,
29850    };
29851    #[cfg(feature = "arbitrary")]
29852    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29853        use arbitrary::{Arbitrary, Unstructured};
29854        let mut buf = [0u8; 1024];
29855        rng.fill_bytes(&mut buf);
29856        let mut unstructured = Unstructured::new(&buf);
29857        Self::arbitrary(&mut unstructured).unwrap_or_default()
29858    }
29859}
29860impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
29861    fn default() -> Self {
29862        Self::DEFAULT.clone()
29863    }
29864}
29865impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
29866    type Message = MavMessage;
29867    const ID: u32 = 48u32;
29868    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
29869    const EXTRA_CRC: u8 = 41u8;
29870    const ENCODED_LEN: usize = 21usize;
29871    fn deser(
29872        _version: MavlinkVersion,
29873        __input: &[u8],
29874    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29875        let avail_len = __input.len();
29876        let mut payload_buf = [0; Self::ENCODED_LEN];
29877        let mut buf = if avail_len < Self::ENCODED_LEN {
29878            payload_buf[0..avail_len].copy_from_slice(__input);
29879            Bytes::new(&payload_buf)
29880        } else {
29881            Bytes::new(__input)
29882        };
29883        let mut __struct = Self::default();
29884        __struct.latitude = buf.get_i32_le();
29885        __struct.longitude = buf.get_i32_le();
29886        __struct.altitude = buf.get_i32_le();
29887        __struct.target_system = buf.get_u8();
29888        __struct.time_usec = buf.get_u64_le();
29889        Ok(__struct)
29890    }
29891    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29892        let mut __tmp = BytesMut::new(bytes);
29893        #[allow(clippy::absurd_extreme_comparisons)]
29894        #[allow(unused_comparisons)]
29895        if __tmp.remaining() < Self::ENCODED_LEN {
29896            panic!(
29897                "buffer is too small (need {} bytes, but got {})",
29898                Self::ENCODED_LEN,
29899                __tmp.remaining(),
29900            )
29901        }
29902        __tmp.put_i32_le(self.latitude);
29903        __tmp.put_i32_le(self.longitude);
29904        __tmp.put_i32_le(self.altitude);
29905        __tmp.put_u8(self.target_system);
29906        __tmp.put_u64_le(self.time_usec);
29907        if matches!(version, MavlinkVersion::V2) {
29908            let len = __tmp.len();
29909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29910        } else {
29911            __tmp.len()
29912        }
29913    }
29914}
29915#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
29916#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
29917#[doc = ""]
29918#[doc = "ID: 243"]
29919#[derive(Debug, Clone, PartialEq)]
29920#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29921#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29922pub struct SET_HOME_POSITION_DATA {
29923    #[doc = "Latitude (WGS84)"]
29924    pub latitude: i32,
29925    #[doc = "Longitude (WGS84)"]
29926    pub longitude: i32,
29927    #[doc = "Altitude (MSL). Positive for up."]
29928    pub altitude: i32,
29929    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
29930    pub x: f32,
29931    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
29932    pub y: f32,
29933    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
29934    pub z: f32,
29935    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
29936    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29937    pub q: [f32; 4],
29938    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29939    pub approach_x: f32,
29940    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29941    pub approach_y: f32,
29942    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
29943    pub approach_z: f32,
29944    #[doc = "System ID."]
29945    pub target_system: u8,
29946    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29948    pub time_usec: u64,
29949}
29950impl SET_HOME_POSITION_DATA {
29951    pub const ENCODED_LEN: usize = 61usize;
29952    pub const DEFAULT: Self = Self {
29953        latitude: 0_i32,
29954        longitude: 0_i32,
29955        altitude: 0_i32,
29956        x: 0.0_f32,
29957        y: 0.0_f32,
29958        z: 0.0_f32,
29959        q: [0.0_f32; 4usize],
29960        approach_x: 0.0_f32,
29961        approach_y: 0.0_f32,
29962        approach_z: 0.0_f32,
29963        target_system: 0_u8,
29964        time_usec: 0_u64,
29965    };
29966    #[cfg(feature = "arbitrary")]
29967    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29968        use arbitrary::{Arbitrary, Unstructured};
29969        let mut buf = [0u8; 1024];
29970        rng.fill_bytes(&mut buf);
29971        let mut unstructured = Unstructured::new(&buf);
29972        Self::arbitrary(&mut unstructured).unwrap_or_default()
29973    }
29974}
29975impl Default for SET_HOME_POSITION_DATA {
29976    fn default() -> Self {
29977        Self::DEFAULT.clone()
29978    }
29979}
29980impl MessageData for SET_HOME_POSITION_DATA {
29981    type Message = MavMessage;
29982    const ID: u32 = 243u32;
29983    const NAME: &'static str = "SET_HOME_POSITION";
29984    const EXTRA_CRC: u8 = 85u8;
29985    const ENCODED_LEN: usize = 61usize;
29986    fn deser(
29987        _version: MavlinkVersion,
29988        __input: &[u8],
29989    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29990        let avail_len = __input.len();
29991        let mut payload_buf = [0; Self::ENCODED_LEN];
29992        let mut buf = if avail_len < Self::ENCODED_LEN {
29993            payload_buf[0..avail_len].copy_from_slice(__input);
29994            Bytes::new(&payload_buf)
29995        } else {
29996            Bytes::new(__input)
29997        };
29998        let mut __struct = Self::default();
29999        __struct.latitude = buf.get_i32_le();
30000        __struct.longitude = buf.get_i32_le();
30001        __struct.altitude = buf.get_i32_le();
30002        __struct.x = buf.get_f32_le();
30003        __struct.y = buf.get_f32_le();
30004        __struct.z = buf.get_f32_le();
30005        for v in &mut __struct.q {
30006            let val = buf.get_f32_le();
30007            *v = val;
30008        }
30009        __struct.approach_x = buf.get_f32_le();
30010        __struct.approach_y = buf.get_f32_le();
30011        __struct.approach_z = buf.get_f32_le();
30012        __struct.target_system = buf.get_u8();
30013        __struct.time_usec = buf.get_u64_le();
30014        Ok(__struct)
30015    }
30016    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30017        let mut __tmp = BytesMut::new(bytes);
30018        #[allow(clippy::absurd_extreme_comparisons)]
30019        #[allow(unused_comparisons)]
30020        if __tmp.remaining() < Self::ENCODED_LEN {
30021            panic!(
30022                "buffer is too small (need {} bytes, but got {})",
30023                Self::ENCODED_LEN,
30024                __tmp.remaining(),
30025            )
30026        }
30027        __tmp.put_i32_le(self.latitude);
30028        __tmp.put_i32_le(self.longitude);
30029        __tmp.put_i32_le(self.altitude);
30030        __tmp.put_f32_le(self.x);
30031        __tmp.put_f32_le(self.y);
30032        __tmp.put_f32_le(self.z);
30033        for val in &self.q {
30034            __tmp.put_f32_le(*val);
30035        }
30036        __tmp.put_f32_le(self.approach_x);
30037        __tmp.put_f32_le(self.approach_y);
30038        __tmp.put_f32_le(self.approach_z);
30039        __tmp.put_u8(self.target_system);
30040        __tmp.put_u64_le(self.time_usec);
30041        if matches!(version, MavlinkVersion::V2) {
30042            let len = __tmp.len();
30043            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30044        } else {
30045            __tmp.len()
30046        }
30047    }
30048}
30049#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
30050#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
30051#[doc = ""]
30052#[doc = "ID: 11"]
30053#[derive(Debug, Clone, PartialEq)]
30054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30056pub struct SET_MODE_DATA {
30057    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
30058    pub custom_mode: u32,
30059    #[doc = "The system setting the mode"]
30060    pub target_system: u8,
30061    #[doc = "The new base mode."]
30062    pub base_mode: MavMode,
30063}
30064impl SET_MODE_DATA {
30065    pub const ENCODED_LEN: usize = 6usize;
30066    pub const DEFAULT: Self = Self {
30067        custom_mode: 0_u32,
30068        target_system: 0_u8,
30069        base_mode: MavMode::DEFAULT,
30070    };
30071    #[cfg(feature = "arbitrary")]
30072    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30073        use arbitrary::{Arbitrary, Unstructured};
30074        let mut buf = [0u8; 1024];
30075        rng.fill_bytes(&mut buf);
30076        let mut unstructured = Unstructured::new(&buf);
30077        Self::arbitrary(&mut unstructured).unwrap_or_default()
30078    }
30079}
30080impl Default for SET_MODE_DATA {
30081    fn default() -> Self {
30082        Self::DEFAULT.clone()
30083    }
30084}
30085impl MessageData for SET_MODE_DATA {
30086    type Message = MavMessage;
30087    const ID: u32 = 11u32;
30088    const NAME: &'static str = "SET_MODE";
30089    const EXTRA_CRC: u8 = 89u8;
30090    const ENCODED_LEN: usize = 6usize;
30091    fn deser(
30092        _version: MavlinkVersion,
30093        __input: &[u8],
30094    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30095        let avail_len = __input.len();
30096        let mut payload_buf = [0; Self::ENCODED_LEN];
30097        let mut buf = if avail_len < Self::ENCODED_LEN {
30098            payload_buf[0..avail_len].copy_from_slice(__input);
30099            Bytes::new(&payload_buf)
30100        } else {
30101            Bytes::new(__input)
30102        };
30103        let mut __struct = Self::default();
30104        __struct.custom_mode = buf.get_u32_le();
30105        __struct.target_system = buf.get_u8();
30106        let tmp = buf.get_u8();
30107        __struct.base_mode =
30108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30109                enum_type: "MavMode",
30110                value: tmp as u32,
30111            })?;
30112        Ok(__struct)
30113    }
30114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30115        let mut __tmp = BytesMut::new(bytes);
30116        #[allow(clippy::absurd_extreme_comparisons)]
30117        #[allow(unused_comparisons)]
30118        if __tmp.remaining() < Self::ENCODED_LEN {
30119            panic!(
30120                "buffer is too small (need {} bytes, but got {})",
30121                Self::ENCODED_LEN,
30122                __tmp.remaining(),
30123            )
30124        }
30125        __tmp.put_u32_le(self.custom_mode);
30126        __tmp.put_u8(self.target_system);
30127        __tmp.put_u8(self.base_mode as u8);
30128        if matches!(version, MavlinkVersion::V2) {
30129            let len = __tmp.len();
30130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30131        } else {
30132            __tmp.len()
30133        }
30134    }
30135}
30136#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
30137#[doc = ""]
30138#[doc = "ID: 86"]
30139#[derive(Debug, Clone, PartialEq)]
30140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30142pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
30143    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
30144    pub time_boot_ms: u32,
30145    #[doc = "Latitude in WGS84 frame"]
30146    pub lat_int: i32,
30147    #[doc = "Longitude in WGS84 frame"]
30148    pub lon_int: i32,
30149    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
30150    pub alt: f32,
30151    #[doc = "X velocity in NED frame"]
30152    pub vx: f32,
30153    #[doc = "Y velocity in NED frame"]
30154    pub vy: f32,
30155    #[doc = "Z velocity in NED frame"]
30156    pub vz: f32,
30157    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30158    pub afx: f32,
30159    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30160    pub afy: f32,
30161    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30162    pub afz: f32,
30163    #[doc = "yaw setpoint"]
30164    pub yaw: f32,
30165    #[doc = "yaw rate setpoint"]
30166    pub yaw_rate: f32,
30167    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30168    pub type_mask: PositionTargetTypemask,
30169    #[doc = "System ID"]
30170    pub target_system: u8,
30171    #[doc = "Component ID"]
30172    pub target_component: u8,
30173    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
30174    pub coordinate_frame: MavFrame,
30175}
30176impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
30177    pub const ENCODED_LEN: usize = 53usize;
30178    pub const DEFAULT: Self = Self {
30179        time_boot_ms: 0_u32,
30180        lat_int: 0_i32,
30181        lon_int: 0_i32,
30182        alt: 0.0_f32,
30183        vx: 0.0_f32,
30184        vy: 0.0_f32,
30185        vz: 0.0_f32,
30186        afx: 0.0_f32,
30187        afy: 0.0_f32,
30188        afz: 0.0_f32,
30189        yaw: 0.0_f32,
30190        yaw_rate: 0.0_f32,
30191        type_mask: PositionTargetTypemask::DEFAULT,
30192        target_system: 0_u8,
30193        target_component: 0_u8,
30194        coordinate_frame: MavFrame::DEFAULT,
30195    };
30196    #[cfg(feature = "arbitrary")]
30197    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30198        use arbitrary::{Arbitrary, Unstructured};
30199        let mut buf = [0u8; 1024];
30200        rng.fill_bytes(&mut buf);
30201        let mut unstructured = Unstructured::new(&buf);
30202        Self::arbitrary(&mut unstructured).unwrap_or_default()
30203    }
30204}
30205impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30206    fn default() -> Self {
30207        Self::DEFAULT.clone()
30208    }
30209}
30210impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
30211    type Message = MavMessage;
30212    const ID: u32 = 86u32;
30213    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
30214    const EXTRA_CRC: u8 = 5u8;
30215    const ENCODED_LEN: usize = 53usize;
30216    fn deser(
30217        _version: MavlinkVersion,
30218        __input: &[u8],
30219    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30220        let avail_len = __input.len();
30221        let mut payload_buf = [0; Self::ENCODED_LEN];
30222        let mut buf = if avail_len < Self::ENCODED_LEN {
30223            payload_buf[0..avail_len].copy_from_slice(__input);
30224            Bytes::new(&payload_buf)
30225        } else {
30226            Bytes::new(__input)
30227        };
30228        let mut __struct = Self::default();
30229        __struct.time_boot_ms = buf.get_u32_le();
30230        __struct.lat_int = buf.get_i32_le();
30231        __struct.lon_int = buf.get_i32_le();
30232        __struct.alt = buf.get_f32_le();
30233        __struct.vx = buf.get_f32_le();
30234        __struct.vy = buf.get_f32_le();
30235        __struct.vz = buf.get_f32_le();
30236        __struct.afx = buf.get_f32_le();
30237        __struct.afy = buf.get_f32_le();
30238        __struct.afz = buf.get_f32_le();
30239        __struct.yaw = buf.get_f32_le();
30240        __struct.yaw_rate = buf.get_f32_le();
30241        let tmp = buf.get_u16_le();
30242        __struct.type_mask = PositionTargetTypemask::from_bits(
30243            tmp & PositionTargetTypemask::all().bits(),
30244        )
30245        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30246            flag_type: "PositionTargetTypemask",
30247            value: tmp as u32,
30248        })?;
30249        __struct.target_system = buf.get_u8();
30250        __struct.target_component = buf.get_u8();
30251        let tmp = buf.get_u8();
30252        __struct.coordinate_frame =
30253            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30254                enum_type: "MavFrame",
30255                value: tmp as u32,
30256            })?;
30257        Ok(__struct)
30258    }
30259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30260        let mut __tmp = BytesMut::new(bytes);
30261        #[allow(clippy::absurd_extreme_comparisons)]
30262        #[allow(unused_comparisons)]
30263        if __tmp.remaining() < Self::ENCODED_LEN {
30264            panic!(
30265                "buffer is too small (need {} bytes, but got {})",
30266                Self::ENCODED_LEN,
30267                __tmp.remaining(),
30268            )
30269        }
30270        __tmp.put_u32_le(self.time_boot_ms);
30271        __tmp.put_i32_le(self.lat_int);
30272        __tmp.put_i32_le(self.lon_int);
30273        __tmp.put_f32_le(self.alt);
30274        __tmp.put_f32_le(self.vx);
30275        __tmp.put_f32_le(self.vy);
30276        __tmp.put_f32_le(self.vz);
30277        __tmp.put_f32_le(self.afx);
30278        __tmp.put_f32_le(self.afy);
30279        __tmp.put_f32_le(self.afz);
30280        __tmp.put_f32_le(self.yaw);
30281        __tmp.put_f32_le(self.yaw_rate);
30282        __tmp.put_u16_le(self.type_mask.bits());
30283        __tmp.put_u8(self.target_system);
30284        __tmp.put_u8(self.target_component);
30285        __tmp.put_u8(self.coordinate_frame as u8);
30286        if matches!(version, MavlinkVersion::V2) {
30287            let len = __tmp.len();
30288            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30289        } else {
30290            __tmp.len()
30291        }
30292    }
30293}
30294#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
30295#[doc = ""]
30296#[doc = "ID: 84"]
30297#[derive(Debug, Clone, PartialEq)]
30298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30300pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
30301    #[doc = "Timestamp (time since system boot)."]
30302    pub time_boot_ms: u32,
30303    #[doc = "X Position in NED frame"]
30304    pub x: f32,
30305    #[doc = "Y Position in NED frame"]
30306    pub y: f32,
30307    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
30308    pub z: f32,
30309    #[doc = "X velocity in NED frame"]
30310    pub vx: f32,
30311    #[doc = "Y velocity in NED frame"]
30312    pub vy: f32,
30313    #[doc = "Z velocity in NED frame"]
30314    pub vz: f32,
30315    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30316    pub afx: f32,
30317    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30318    pub afy: f32,
30319    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
30320    pub afz: f32,
30321    #[doc = "yaw setpoint"]
30322    pub yaw: f32,
30323    #[doc = "yaw rate setpoint"]
30324    pub yaw_rate: f32,
30325    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
30326    pub type_mask: PositionTargetTypemask,
30327    #[doc = "System ID"]
30328    pub target_system: u8,
30329    #[doc = "Component ID"]
30330    pub target_component: u8,
30331    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
30332    pub coordinate_frame: MavFrame,
30333}
30334impl SET_POSITION_TARGET_LOCAL_NED_DATA {
30335    pub const ENCODED_LEN: usize = 53usize;
30336    pub const DEFAULT: Self = Self {
30337        time_boot_ms: 0_u32,
30338        x: 0.0_f32,
30339        y: 0.0_f32,
30340        z: 0.0_f32,
30341        vx: 0.0_f32,
30342        vy: 0.0_f32,
30343        vz: 0.0_f32,
30344        afx: 0.0_f32,
30345        afy: 0.0_f32,
30346        afz: 0.0_f32,
30347        yaw: 0.0_f32,
30348        yaw_rate: 0.0_f32,
30349        type_mask: PositionTargetTypemask::DEFAULT,
30350        target_system: 0_u8,
30351        target_component: 0_u8,
30352        coordinate_frame: MavFrame::DEFAULT,
30353    };
30354    #[cfg(feature = "arbitrary")]
30355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30356        use arbitrary::{Arbitrary, Unstructured};
30357        let mut buf = [0u8; 1024];
30358        rng.fill_bytes(&mut buf);
30359        let mut unstructured = Unstructured::new(&buf);
30360        Self::arbitrary(&mut unstructured).unwrap_or_default()
30361    }
30362}
30363impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
30364    fn default() -> Self {
30365        Self::DEFAULT.clone()
30366    }
30367}
30368impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
30369    type Message = MavMessage;
30370    const ID: u32 = 84u32;
30371    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
30372    const EXTRA_CRC: u8 = 143u8;
30373    const ENCODED_LEN: usize = 53usize;
30374    fn deser(
30375        _version: MavlinkVersion,
30376        __input: &[u8],
30377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30378        let avail_len = __input.len();
30379        let mut payload_buf = [0; Self::ENCODED_LEN];
30380        let mut buf = if avail_len < Self::ENCODED_LEN {
30381            payload_buf[0..avail_len].copy_from_slice(__input);
30382            Bytes::new(&payload_buf)
30383        } else {
30384            Bytes::new(__input)
30385        };
30386        let mut __struct = Self::default();
30387        __struct.time_boot_ms = buf.get_u32_le();
30388        __struct.x = buf.get_f32_le();
30389        __struct.y = buf.get_f32_le();
30390        __struct.z = buf.get_f32_le();
30391        __struct.vx = buf.get_f32_le();
30392        __struct.vy = buf.get_f32_le();
30393        __struct.vz = buf.get_f32_le();
30394        __struct.afx = buf.get_f32_le();
30395        __struct.afy = buf.get_f32_le();
30396        __struct.afz = buf.get_f32_le();
30397        __struct.yaw = buf.get_f32_le();
30398        __struct.yaw_rate = buf.get_f32_le();
30399        let tmp = buf.get_u16_le();
30400        __struct.type_mask = PositionTargetTypemask::from_bits(
30401            tmp & PositionTargetTypemask::all().bits(),
30402        )
30403        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30404            flag_type: "PositionTargetTypemask",
30405            value: tmp as u32,
30406        })?;
30407        __struct.target_system = buf.get_u8();
30408        __struct.target_component = buf.get_u8();
30409        let tmp = buf.get_u8();
30410        __struct.coordinate_frame =
30411            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30412                enum_type: "MavFrame",
30413                value: tmp as u32,
30414            })?;
30415        Ok(__struct)
30416    }
30417    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30418        let mut __tmp = BytesMut::new(bytes);
30419        #[allow(clippy::absurd_extreme_comparisons)]
30420        #[allow(unused_comparisons)]
30421        if __tmp.remaining() < Self::ENCODED_LEN {
30422            panic!(
30423                "buffer is too small (need {} bytes, but got {})",
30424                Self::ENCODED_LEN,
30425                __tmp.remaining(),
30426            )
30427        }
30428        __tmp.put_u32_le(self.time_boot_ms);
30429        __tmp.put_f32_le(self.x);
30430        __tmp.put_f32_le(self.y);
30431        __tmp.put_f32_le(self.z);
30432        __tmp.put_f32_le(self.vx);
30433        __tmp.put_f32_le(self.vy);
30434        __tmp.put_f32_le(self.vz);
30435        __tmp.put_f32_le(self.afx);
30436        __tmp.put_f32_le(self.afy);
30437        __tmp.put_f32_le(self.afz);
30438        __tmp.put_f32_le(self.yaw);
30439        __tmp.put_f32_le(self.yaw_rate);
30440        __tmp.put_u16_le(self.type_mask.bits());
30441        __tmp.put_u8(self.target_system);
30442        __tmp.put_u8(self.target_component);
30443        __tmp.put_u8(self.coordinate_frame as u8);
30444        if matches!(version, MavlinkVersion::V2) {
30445            let len = __tmp.len();
30446            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30447        } else {
30448            __tmp.len()
30449        }
30450    }
30451}
30452#[doc = "Status of simulation environment, if used."]
30453#[doc = ""]
30454#[doc = "ID: 108"]
30455#[derive(Debug, Clone, PartialEq)]
30456#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30457#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30458pub struct SIM_STATE_DATA {
30459    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
30460    pub q1: f32,
30461    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
30462    pub q2: f32,
30463    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
30464    pub q3: f32,
30465    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
30466    pub q4: f32,
30467    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
30468    pub roll: f32,
30469    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
30470    pub pitch: f32,
30471    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
30472    pub yaw: f32,
30473    #[doc = "X acceleration"]
30474    pub xacc: f32,
30475    #[doc = "Y acceleration"]
30476    pub yacc: f32,
30477    #[doc = "Z acceleration"]
30478    pub zacc: f32,
30479    #[doc = "Angular speed around X axis"]
30480    pub xgyro: f32,
30481    #[doc = "Angular speed around Y axis"]
30482    pub ygyro: f32,
30483    #[doc = "Angular speed around Z axis"]
30484    pub zgyro: f32,
30485    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
30486    pub lat: f32,
30487    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
30488    pub lon: f32,
30489    #[doc = "Altitude"]
30490    pub alt: f32,
30491    #[doc = "Horizontal position standard deviation"]
30492    pub std_dev_horz: f32,
30493    #[doc = "Vertical position standard deviation"]
30494    pub std_dev_vert: f32,
30495    #[doc = "True velocity in north direction in earth-fixed NED frame"]
30496    pub vn: f32,
30497    #[doc = "True velocity in east direction in earth-fixed NED frame"]
30498    pub ve: f32,
30499    #[doc = "True velocity in down direction in earth-fixed NED frame"]
30500    pub vd: f32,
30501    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
30502    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30503    pub lat_int: i32,
30504    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
30505    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30506    pub lon_int: i32,
30507}
30508impl SIM_STATE_DATA {
30509    pub const ENCODED_LEN: usize = 92usize;
30510    pub const DEFAULT: Self = Self {
30511        q1: 0.0_f32,
30512        q2: 0.0_f32,
30513        q3: 0.0_f32,
30514        q4: 0.0_f32,
30515        roll: 0.0_f32,
30516        pitch: 0.0_f32,
30517        yaw: 0.0_f32,
30518        xacc: 0.0_f32,
30519        yacc: 0.0_f32,
30520        zacc: 0.0_f32,
30521        xgyro: 0.0_f32,
30522        ygyro: 0.0_f32,
30523        zgyro: 0.0_f32,
30524        lat: 0.0_f32,
30525        lon: 0.0_f32,
30526        alt: 0.0_f32,
30527        std_dev_horz: 0.0_f32,
30528        std_dev_vert: 0.0_f32,
30529        vn: 0.0_f32,
30530        ve: 0.0_f32,
30531        vd: 0.0_f32,
30532        lat_int: 0_i32,
30533        lon_int: 0_i32,
30534    };
30535    #[cfg(feature = "arbitrary")]
30536    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30537        use arbitrary::{Arbitrary, Unstructured};
30538        let mut buf = [0u8; 1024];
30539        rng.fill_bytes(&mut buf);
30540        let mut unstructured = Unstructured::new(&buf);
30541        Self::arbitrary(&mut unstructured).unwrap_or_default()
30542    }
30543}
30544impl Default for SIM_STATE_DATA {
30545    fn default() -> Self {
30546        Self::DEFAULT.clone()
30547    }
30548}
30549impl MessageData for SIM_STATE_DATA {
30550    type Message = MavMessage;
30551    const ID: u32 = 108u32;
30552    const NAME: &'static str = "SIM_STATE";
30553    const EXTRA_CRC: u8 = 32u8;
30554    const ENCODED_LEN: usize = 92usize;
30555    fn deser(
30556        _version: MavlinkVersion,
30557        __input: &[u8],
30558    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30559        let avail_len = __input.len();
30560        let mut payload_buf = [0; Self::ENCODED_LEN];
30561        let mut buf = if avail_len < Self::ENCODED_LEN {
30562            payload_buf[0..avail_len].copy_from_slice(__input);
30563            Bytes::new(&payload_buf)
30564        } else {
30565            Bytes::new(__input)
30566        };
30567        let mut __struct = Self::default();
30568        __struct.q1 = buf.get_f32_le();
30569        __struct.q2 = buf.get_f32_le();
30570        __struct.q3 = buf.get_f32_le();
30571        __struct.q4 = buf.get_f32_le();
30572        __struct.roll = buf.get_f32_le();
30573        __struct.pitch = buf.get_f32_le();
30574        __struct.yaw = buf.get_f32_le();
30575        __struct.xacc = buf.get_f32_le();
30576        __struct.yacc = buf.get_f32_le();
30577        __struct.zacc = buf.get_f32_le();
30578        __struct.xgyro = buf.get_f32_le();
30579        __struct.ygyro = buf.get_f32_le();
30580        __struct.zgyro = buf.get_f32_le();
30581        __struct.lat = buf.get_f32_le();
30582        __struct.lon = buf.get_f32_le();
30583        __struct.alt = buf.get_f32_le();
30584        __struct.std_dev_horz = buf.get_f32_le();
30585        __struct.std_dev_vert = buf.get_f32_le();
30586        __struct.vn = buf.get_f32_le();
30587        __struct.ve = buf.get_f32_le();
30588        __struct.vd = buf.get_f32_le();
30589        __struct.lat_int = buf.get_i32_le();
30590        __struct.lon_int = buf.get_i32_le();
30591        Ok(__struct)
30592    }
30593    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30594        let mut __tmp = BytesMut::new(bytes);
30595        #[allow(clippy::absurd_extreme_comparisons)]
30596        #[allow(unused_comparisons)]
30597        if __tmp.remaining() < Self::ENCODED_LEN {
30598            panic!(
30599                "buffer is too small (need {} bytes, but got {})",
30600                Self::ENCODED_LEN,
30601                __tmp.remaining(),
30602            )
30603        }
30604        __tmp.put_f32_le(self.q1);
30605        __tmp.put_f32_le(self.q2);
30606        __tmp.put_f32_le(self.q3);
30607        __tmp.put_f32_le(self.q4);
30608        __tmp.put_f32_le(self.roll);
30609        __tmp.put_f32_le(self.pitch);
30610        __tmp.put_f32_le(self.yaw);
30611        __tmp.put_f32_le(self.xacc);
30612        __tmp.put_f32_le(self.yacc);
30613        __tmp.put_f32_le(self.zacc);
30614        __tmp.put_f32_le(self.xgyro);
30615        __tmp.put_f32_le(self.ygyro);
30616        __tmp.put_f32_le(self.zgyro);
30617        __tmp.put_f32_le(self.lat);
30618        __tmp.put_f32_le(self.lon);
30619        __tmp.put_f32_le(self.alt);
30620        __tmp.put_f32_le(self.std_dev_horz);
30621        __tmp.put_f32_le(self.std_dev_vert);
30622        __tmp.put_f32_le(self.vn);
30623        __tmp.put_f32_le(self.ve);
30624        __tmp.put_f32_le(self.vd);
30625        __tmp.put_i32_le(self.lat_int);
30626        __tmp.put_i32_le(self.lon_int);
30627        if matches!(version, MavlinkVersion::V2) {
30628            let len = __tmp.len();
30629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30630        } else {
30631            __tmp.len()
30632        }
30633    }
30634}
30635#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
30636#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
30637#[doc = ""]
30638#[doc = "ID: 370"]
30639#[derive(Debug, Clone, PartialEq)]
30640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30642pub struct SMART_BATTERY_INFO_DATA {
30643    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
30644    pub capacity_full_specification: i32,
30645    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
30646    pub capacity_full: i32,
30647    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
30648    pub cycle_count: u16,
30649    #[doc = "Battery weight. 0: field not provided."]
30650    pub weight: u16,
30651    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
30652    pub discharge_minimum_voltage: u16,
30653    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
30654    pub charging_minimum_voltage: u16,
30655    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
30656    pub resting_minimum_voltage: u16,
30657    #[doc = "Battery ID"]
30658    pub id: u8,
30659    #[doc = "Function of the battery"]
30660    pub battery_function: MavBatteryFunction,
30661    #[doc = "Type (chemistry) of the battery"]
30662    pub mavtype: MavBatteryType,
30663    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
30664    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30665    pub serial_number: [u8; 16],
30666    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
30667    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30668    pub device_name: [u8; 50],
30669    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
30670    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30671    pub charging_maximum_voltage: u16,
30672    #[doc = "Number of battery cells in series. 0: field not provided."]
30673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30674    pub cells_in_series: u8,
30675    #[doc = "Maximum pack discharge current. 0: field not provided."]
30676    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30677    pub discharge_maximum_current: u32,
30678    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
30679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30680    pub discharge_maximum_burst_current: u32,
30681    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
30682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30683    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30684    pub manufacture_date: [u8; 11],
30685}
30686impl SMART_BATTERY_INFO_DATA {
30687    pub const ENCODED_LEN: usize = 109usize;
30688    pub const DEFAULT: Self = Self {
30689        capacity_full_specification: 0_i32,
30690        capacity_full: 0_i32,
30691        cycle_count: 0_u16,
30692        weight: 0_u16,
30693        discharge_minimum_voltage: 0_u16,
30694        charging_minimum_voltage: 0_u16,
30695        resting_minimum_voltage: 0_u16,
30696        id: 0_u8,
30697        battery_function: MavBatteryFunction::DEFAULT,
30698        mavtype: MavBatteryType::DEFAULT,
30699        serial_number: [0_u8; 16usize],
30700        device_name: [0_u8; 50usize],
30701        charging_maximum_voltage: 0_u16,
30702        cells_in_series: 0_u8,
30703        discharge_maximum_current: 0_u32,
30704        discharge_maximum_burst_current: 0_u32,
30705        manufacture_date: [0_u8; 11usize],
30706    };
30707    #[cfg(feature = "arbitrary")]
30708    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30709        use arbitrary::{Arbitrary, Unstructured};
30710        let mut buf = [0u8; 1024];
30711        rng.fill_bytes(&mut buf);
30712        let mut unstructured = Unstructured::new(&buf);
30713        Self::arbitrary(&mut unstructured).unwrap_or_default()
30714    }
30715}
30716impl Default for SMART_BATTERY_INFO_DATA {
30717    fn default() -> Self {
30718        Self::DEFAULT.clone()
30719    }
30720}
30721impl MessageData for SMART_BATTERY_INFO_DATA {
30722    type Message = MavMessage;
30723    const ID: u32 = 370u32;
30724    const NAME: &'static str = "SMART_BATTERY_INFO";
30725    const EXTRA_CRC: u8 = 75u8;
30726    const ENCODED_LEN: usize = 109usize;
30727    fn deser(
30728        _version: MavlinkVersion,
30729        __input: &[u8],
30730    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30731        let avail_len = __input.len();
30732        let mut payload_buf = [0; Self::ENCODED_LEN];
30733        let mut buf = if avail_len < Self::ENCODED_LEN {
30734            payload_buf[0..avail_len].copy_from_slice(__input);
30735            Bytes::new(&payload_buf)
30736        } else {
30737            Bytes::new(__input)
30738        };
30739        let mut __struct = Self::default();
30740        __struct.capacity_full_specification = buf.get_i32_le();
30741        __struct.capacity_full = buf.get_i32_le();
30742        __struct.cycle_count = buf.get_u16_le();
30743        __struct.weight = buf.get_u16_le();
30744        __struct.discharge_minimum_voltage = buf.get_u16_le();
30745        __struct.charging_minimum_voltage = buf.get_u16_le();
30746        __struct.resting_minimum_voltage = buf.get_u16_le();
30747        __struct.id = buf.get_u8();
30748        let tmp = buf.get_u8();
30749        __struct.battery_function =
30750            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30751                enum_type: "MavBatteryFunction",
30752                value: tmp as u32,
30753            })?;
30754        let tmp = buf.get_u8();
30755        __struct.mavtype =
30756            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30757                enum_type: "MavBatteryType",
30758                value: tmp as u32,
30759            })?;
30760        for v in &mut __struct.serial_number {
30761            let val = buf.get_u8();
30762            *v = val;
30763        }
30764        for v in &mut __struct.device_name {
30765            let val = buf.get_u8();
30766            *v = val;
30767        }
30768        __struct.charging_maximum_voltage = buf.get_u16_le();
30769        __struct.cells_in_series = buf.get_u8();
30770        __struct.discharge_maximum_current = buf.get_u32_le();
30771        __struct.discharge_maximum_burst_current = buf.get_u32_le();
30772        for v in &mut __struct.manufacture_date {
30773            let val = buf.get_u8();
30774            *v = val;
30775        }
30776        Ok(__struct)
30777    }
30778    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30779        let mut __tmp = BytesMut::new(bytes);
30780        #[allow(clippy::absurd_extreme_comparisons)]
30781        #[allow(unused_comparisons)]
30782        if __tmp.remaining() < Self::ENCODED_LEN {
30783            panic!(
30784                "buffer is too small (need {} bytes, but got {})",
30785                Self::ENCODED_LEN,
30786                __tmp.remaining(),
30787            )
30788        }
30789        __tmp.put_i32_le(self.capacity_full_specification);
30790        __tmp.put_i32_le(self.capacity_full);
30791        __tmp.put_u16_le(self.cycle_count);
30792        __tmp.put_u16_le(self.weight);
30793        __tmp.put_u16_le(self.discharge_minimum_voltage);
30794        __tmp.put_u16_le(self.charging_minimum_voltage);
30795        __tmp.put_u16_le(self.resting_minimum_voltage);
30796        __tmp.put_u8(self.id);
30797        __tmp.put_u8(self.battery_function as u8);
30798        __tmp.put_u8(self.mavtype as u8);
30799        for val in &self.serial_number {
30800            __tmp.put_u8(*val);
30801        }
30802        for val in &self.device_name {
30803            __tmp.put_u8(*val);
30804        }
30805        __tmp.put_u16_le(self.charging_maximum_voltage);
30806        __tmp.put_u8(self.cells_in_series);
30807        __tmp.put_u32_le(self.discharge_maximum_current);
30808        __tmp.put_u32_le(self.discharge_maximum_burst_current);
30809        for val in &self.manufacture_date {
30810            __tmp.put_u8(*val);
30811        }
30812        if matches!(version, MavlinkVersion::V2) {
30813            let len = __tmp.len();
30814            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30815        } else {
30816            __tmp.len()
30817        }
30818    }
30819}
30820#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
30821#[doc = ""]
30822#[doc = "ID: 253"]
30823#[derive(Debug, Clone, PartialEq)]
30824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30825#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30826pub struct STATUSTEXT_DATA {
30827    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
30828    pub severity: MavSeverity,
30829    #[doc = "Status text message, without null termination character"]
30830    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30831    pub text: [u8; 50],
30832    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
30833    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30834    pub id: u16,
30835    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
30836    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30837    pub chunk_seq: u8,
30838}
30839impl STATUSTEXT_DATA {
30840    pub const ENCODED_LEN: usize = 54usize;
30841    pub const DEFAULT: Self = Self {
30842        severity: MavSeverity::DEFAULT,
30843        text: [0_u8; 50usize],
30844        id: 0_u16,
30845        chunk_seq: 0_u8,
30846    };
30847    #[cfg(feature = "arbitrary")]
30848    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30849        use arbitrary::{Arbitrary, Unstructured};
30850        let mut buf = [0u8; 1024];
30851        rng.fill_bytes(&mut buf);
30852        let mut unstructured = Unstructured::new(&buf);
30853        Self::arbitrary(&mut unstructured).unwrap_or_default()
30854    }
30855}
30856impl Default for STATUSTEXT_DATA {
30857    fn default() -> Self {
30858        Self::DEFAULT.clone()
30859    }
30860}
30861impl MessageData for STATUSTEXT_DATA {
30862    type Message = MavMessage;
30863    const ID: u32 = 253u32;
30864    const NAME: &'static str = "STATUSTEXT";
30865    const EXTRA_CRC: u8 = 83u8;
30866    const ENCODED_LEN: usize = 54usize;
30867    fn deser(
30868        _version: MavlinkVersion,
30869        __input: &[u8],
30870    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30871        let avail_len = __input.len();
30872        let mut payload_buf = [0; Self::ENCODED_LEN];
30873        let mut buf = if avail_len < Self::ENCODED_LEN {
30874            payload_buf[0..avail_len].copy_from_slice(__input);
30875            Bytes::new(&payload_buf)
30876        } else {
30877            Bytes::new(__input)
30878        };
30879        let mut __struct = Self::default();
30880        let tmp = buf.get_u8();
30881        __struct.severity =
30882            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30883                enum_type: "MavSeverity",
30884                value: tmp as u32,
30885            })?;
30886        for v in &mut __struct.text {
30887            let val = buf.get_u8();
30888            *v = val;
30889        }
30890        __struct.id = buf.get_u16_le();
30891        __struct.chunk_seq = buf.get_u8();
30892        Ok(__struct)
30893    }
30894    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30895        let mut __tmp = BytesMut::new(bytes);
30896        #[allow(clippy::absurd_extreme_comparisons)]
30897        #[allow(unused_comparisons)]
30898        if __tmp.remaining() < Self::ENCODED_LEN {
30899            panic!(
30900                "buffer is too small (need {} bytes, but got {})",
30901                Self::ENCODED_LEN,
30902                __tmp.remaining(),
30903            )
30904        }
30905        __tmp.put_u8(self.severity as u8);
30906        for val in &self.text {
30907            __tmp.put_u8(*val);
30908        }
30909        __tmp.put_u16_le(self.id);
30910        __tmp.put_u8(self.chunk_seq);
30911        if matches!(version, MavlinkVersion::V2) {
30912            let len = __tmp.len();
30913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30914        } else {
30915            __tmp.len()
30916        }
30917    }
30918}
30919#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
30920#[doc = ""]
30921#[doc = "ID: 261"]
30922#[derive(Debug, Clone, PartialEq)]
30923#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30924#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30925pub struct STORAGE_INFORMATION_DATA {
30926    #[doc = "Timestamp (time since system boot)."]
30927    pub time_boot_ms: u32,
30928    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30929    pub total_capacity: f32,
30930    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30931    pub used_capacity: f32,
30932    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
30933    pub available_capacity: f32,
30934    #[doc = "Read speed."]
30935    pub read_speed: f32,
30936    #[doc = "Write speed."]
30937    pub write_speed: f32,
30938    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
30939    pub storage_id: u8,
30940    #[doc = "Number of storage devices"]
30941    pub storage_count: u8,
30942    #[doc = "Status of storage"]
30943    pub status: StorageStatus,
30944    #[doc = "Type of storage"]
30945    #[cfg_attr(feature = "serde", serde(default))]
30946    pub mavtype: StorageType,
30947    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
30948    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30949    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30950    pub name: [u8; 32],
30951    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
30952    #[cfg_attr(feature = "serde", serde(default))]
30953    pub storage_usage: StorageUsageFlag,
30954}
30955impl STORAGE_INFORMATION_DATA {
30956    pub const ENCODED_LEN: usize = 61usize;
30957    pub const DEFAULT: Self = Self {
30958        time_boot_ms: 0_u32,
30959        total_capacity: 0.0_f32,
30960        used_capacity: 0.0_f32,
30961        available_capacity: 0.0_f32,
30962        read_speed: 0.0_f32,
30963        write_speed: 0.0_f32,
30964        storage_id: 0_u8,
30965        storage_count: 0_u8,
30966        status: StorageStatus::DEFAULT,
30967        mavtype: StorageType::DEFAULT,
30968        name: [0_u8; 32usize],
30969        storage_usage: StorageUsageFlag::DEFAULT,
30970    };
30971    #[cfg(feature = "arbitrary")]
30972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30973        use arbitrary::{Arbitrary, Unstructured};
30974        let mut buf = [0u8; 1024];
30975        rng.fill_bytes(&mut buf);
30976        let mut unstructured = Unstructured::new(&buf);
30977        Self::arbitrary(&mut unstructured).unwrap_or_default()
30978    }
30979}
30980impl Default for STORAGE_INFORMATION_DATA {
30981    fn default() -> Self {
30982        Self::DEFAULT.clone()
30983    }
30984}
30985impl MessageData for STORAGE_INFORMATION_DATA {
30986    type Message = MavMessage;
30987    const ID: u32 = 261u32;
30988    const NAME: &'static str = "STORAGE_INFORMATION";
30989    const EXTRA_CRC: u8 = 179u8;
30990    const ENCODED_LEN: usize = 61usize;
30991    fn deser(
30992        _version: MavlinkVersion,
30993        __input: &[u8],
30994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30995        let avail_len = __input.len();
30996        let mut payload_buf = [0; Self::ENCODED_LEN];
30997        let mut buf = if avail_len < Self::ENCODED_LEN {
30998            payload_buf[0..avail_len].copy_from_slice(__input);
30999            Bytes::new(&payload_buf)
31000        } else {
31001            Bytes::new(__input)
31002        };
31003        let mut __struct = Self::default();
31004        __struct.time_boot_ms = buf.get_u32_le();
31005        __struct.total_capacity = buf.get_f32_le();
31006        __struct.used_capacity = buf.get_f32_le();
31007        __struct.available_capacity = buf.get_f32_le();
31008        __struct.read_speed = buf.get_f32_le();
31009        __struct.write_speed = buf.get_f32_le();
31010        __struct.storage_id = buf.get_u8();
31011        __struct.storage_count = buf.get_u8();
31012        let tmp = buf.get_u8();
31013        __struct.status =
31014            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31015                enum_type: "StorageStatus",
31016                value: tmp as u32,
31017            })?;
31018        let tmp = buf.get_u8();
31019        __struct.mavtype =
31020            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31021                enum_type: "StorageType",
31022                value: tmp as u32,
31023            })?;
31024        for v in &mut __struct.name {
31025            let val = buf.get_u8();
31026            *v = val;
31027        }
31028        let tmp = buf.get_u8();
31029        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
31030            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31031                flag_type: "StorageUsageFlag",
31032                value: tmp as u32,
31033            })?;
31034        Ok(__struct)
31035    }
31036    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31037        let mut __tmp = BytesMut::new(bytes);
31038        #[allow(clippy::absurd_extreme_comparisons)]
31039        #[allow(unused_comparisons)]
31040        if __tmp.remaining() < Self::ENCODED_LEN {
31041            panic!(
31042                "buffer is too small (need {} bytes, but got {})",
31043                Self::ENCODED_LEN,
31044                __tmp.remaining(),
31045            )
31046        }
31047        __tmp.put_u32_le(self.time_boot_ms);
31048        __tmp.put_f32_le(self.total_capacity);
31049        __tmp.put_f32_le(self.used_capacity);
31050        __tmp.put_f32_le(self.available_capacity);
31051        __tmp.put_f32_le(self.read_speed);
31052        __tmp.put_f32_le(self.write_speed);
31053        __tmp.put_u8(self.storage_id);
31054        __tmp.put_u8(self.storage_count);
31055        __tmp.put_u8(self.status as u8);
31056        __tmp.put_u8(self.mavtype as u8);
31057        for val in &self.name {
31058            __tmp.put_u8(*val);
31059        }
31060        __tmp.put_u8(self.storage_usage.bits());
31061        if matches!(version, MavlinkVersion::V2) {
31062            let len = __tmp.len();
31063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31064        } else {
31065            __tmp.len()
31066        }
31067    }
31068}
31069#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
31070#[doc = ""]
31071#[doc = "ID: 401"]
31072#[derive(Debug, Clone, PartialEq)]
31073#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31074#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31075pub struct SUPPORTED_TUNES_DATA {
31076    #[doc = "Bitfield of supported tune formats."]
31077    pub format: TuneFormat,
31078    #[doc = "System ID"]
31079    pub target_system: u8,
31080    #[doc = "Component ID"]
31081    pub target_component: u8,
31082}
31083impl SUPPORTED_TUNES_DATA {
31084    pub const ENCODED_LEN: usize = 6usize;
31085    pub const DEFAULT: Self = Self {
31086        format: TuneFormat::DEFAULT,
31087        target_system: 0_u8,
31088        target_component: 0_u8,
31089    };
31090    #[cfg(feature = "arbitrary")]
31091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31092        use arbitrary::{Arbitrary, Unstructured};
31093        let mut buf = [0u8; 1024];
31094        rng.fill_bytes(&mut buf);
31095        let mut unstructured = Unstructured::new(&buf);
31096        Self::arbitrary(&mut unstructured).unwrap_or_default()
31097    }
31098}
31099impl Default for SUPPORTED_TUNES_DATA {
31100    fn default() -> Self {
31101        Self::DEFAULT.clone()
31102    }
31103}
31104impl MessageData for SUPPORTED_TUNES_DATA {
31105    type Message = MavMessage;
31106    const ID: u32 = 401u32;
31107    const NAME: &'static str = "SUPPORTED_TUNES";
31108    const EXTRA_CRC: u8 = 183u8;
31109    const ENCODED_LEN: usize = 6usize;
31110    fn deser(
31111        _version: MavlinkVersion,
31112        __input: &[u8],
31113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31114        let avail_len = __input.len();
31115        let mut payload_buf = [0; Self::ENCODED_LEN];
31116        let mut buf = if avail_len < Self::ENCODED_LEN {
31117            payload_buf[0..avail_len].copy_from_slice(__input);
31118            Bytes::new(&payload_buf)
31119        } else {
31120            Bytes::new(__input)
31121        };
31122        let mut __struct = Self::default();
31123        let tmp = buf.get_u32_le();
31124        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
31125            ::mavlink_core::error::ParserError::InvalidEnum {
31126                enum_type: "TuneFormat",
31127                value: tmp as u32,
31128            },
31129        )?;
31130        __struct.target_system = buf.get_u8();
31131        __struct.target_component = buf.get_u8();
31132        Ok(__struct)
31133    }
31134    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31135        let mut __tmp = BytesMut::new(bytes);
31136        #[allow(clippy::absurd_extreme_comparisons)]
31137        #[allow(unused_comparisons)]
31138        if __tmp.remaining() < Self::ENCODED_LEN {
31139            panic!(
31140                "buffer is too small (need {} bytes, but got {})",
31141                Self::ENCODED_LEN,
31142                __tmp.remaining(),
31143            )
31144        }
31145        __tmp.put_u32_le(self.format as u32);
31146        __tmp.put_u8(self.target_system);
31147        __tmp.put_u8(self.target_component);
31148        if matches!(version, MavlinkVersion::V2) {
31149            let len = __tmp.len();
31150            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31151        } else {
31152            __tmp.len()
31153        }
31154    }
31155}
31156#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
31157#[doc = ""]
31158#[doc = "ID: 2"]
31159#[derive(Debug, Clone, PartialEq)]
31160#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31161#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31162pub struct SYSTEM_TIME_DATA {
31163    #[doc = "Timestamp (UNIX epoch time)."]
31164    pub time_unix_usec: u64,
31165    #[doc = "Timestamp (time since system boot)."]
31166    pub time_boot_ms: u32,
31167}
31168impl SYSTEM_TIME_DATA {
31169    pub const ENCODED_LEN: usize = 12usize;
31170    pub const DEFAULT: Self = Self {
31171        time_unix_usec: 0_u64,
31172        time_boot_ms: 0_u32,
31173    };
31174    #[cfg(feature = "arbitrary")]
31175    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31176        use arbitrary::{Arbitrary, Unstructured};
31177        let mut buf = [0u8; 1024];
31178        rng.fill_bytes(&mut buf);
31179        let mut unstructured = Unstructured::new(&buf);
31180        Self::arbitrary(&mut unstructured).unwrap_or_default()
31181    }
31182}
31183impl Default for SYSTEM_TIME_DATA {
31184    fn default() -> Self {
31185        Self::DEFAULT.clone()
31186    }
31187}
31188impl MessageData for SYSTEM_TIME_DATA {
31189    type Message = MavMessage;
31190    const ID: u32 = 2u32;
31191    const NAME: &'static str = "SYSTEM_TIME";
31192    const EXTRA_CRC: u8 = 137u8;
31193    const ENCODED_LEN: usize = 12usize;
31194    fn deser(
31195        _version: MavlinkVersion,
31196        __input: &[u8],
31197    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31198        let avail_len = __input.len();
31199        let mut payload_buf = [0; Self::ENCODED_LEN];
31200        let mut buf = if avail_len < Self::ENCODED_LEN {
31201            payload_buf[0..avail_len].copy_from_slice(__input);
31202            Bytes::new(&payload_buf)
31203        } else {
31204            Bytes::new(__input)
31205        };
31206        let mut __struct = Self::default();
31207        __struct.time_unix_usec = buf.get_u64_le();
31208        __struct.time_boot_ms = buf.get_u32_le();
31209        Ok(__struct)
31210    }
31211    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31212        let mut __tmp = BytesMut::new(bytes);
31213        #[allow(clippy::absurd_extreme_comparisons)]
31214        #[allow(unused_comparisons)]
31215        if __tmp.remaining() < Self::ENCODED_LEN {
31216            panic!(
31217                "buffer is too small (need {} bytes, but got {})",
31218                Self::ENCODED_LEN,
31219                __tmp.remaining(),
31220            )
31221        }
31222        __tmp.put_u64_le(self.time_unix_usec);
31223        __tmp.put_u32_le(self.time_boot_ms);
31224        if matches!(version, MavlinkVersion::V2) {
31225            let len = __tmp.len();
31226            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31227        } else {
31228            __tmp.len()
31229        }
31230    }
31231}
31232#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
31233#[doc = ""]
31234#[doc = "ID: 1"]
31235#[derive(Debug, Clone, PartialEq)]
31236#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31237#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31238pub struct SYS_STATUS_DATA {
31239    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31240    pub onboard_control_sensors_present: MavSysStatusSensor,
31241    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31242    pub onboard_control_sensors_enabled: MavSysStatusSensor,
31243    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31244    pub onboard_control_sensors_health: MavSysStatusSensor,
31245    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
31246    pub load: u16,
31247    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
31248    pub voltage_battery: u16,
31249    #[doc = "Battery current, -1: Current not sent by autopilot"]
31250    pub current_battery: i16,
31251    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31252    pub drop_rate_comm: u16,
31253    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
31254    pub errors_comm: u16,
31255    #[doc = "Autopilot-specific errors"]
31256    pub errors_count1: u16,
31257    #[doc = "Autopilot-specific errors"]
31258    pub errors_count2: u16,
31259    #[doc = "Autopilot-specific errors"]
31260    pub errors_count3: u16,
31261    #[doc = "Autopilot-specific errors"]
31262    pub errors_count4: u16,
31263    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
31264    pub battery_remaining: i8,
31265    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
31266    #[cfg_attr(feature = "serde", serde(default))]
31267    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
31268    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
31269    #[cfg_attr(feature = "serde", serde(default))]
31270    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
31271    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
31272    #[cfg_attr(feature = "serde", serde(default))]
31273    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
31274}
31275impl SYS_STATUS_DATA {
31276    pub const ENCODED_LEN: usize = 43usize;
31277    pub const DEFAULT: Self = Self {
31278        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
31279        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
31280        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
31281        load: 0_u16,
31282        voltage_battery: 0_u16,
31283        current_battery: 0_i16,
31284        drop_rate_comm: 0_u16,
31285        errors_comm: 0_u16,
31286        errors_count1: 0_u16,
31287        errors_count2: 0_u16,
31288        errors_count3: 0_u16,
31289        errors_count4: 0_u16,
31290        battery_remaining: 0_i8,
31291        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
31292        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
31293        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
31294    };
31295    #[cfg(feature = "arbitrary")]
31296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31297        use arbitrary::{Arbitrary, Unstructured};
31298        let mut buf = [0u8; 1024];
31299        rng.fill_bytes(&mut buf);
31300        let mut unstructured = Unstructured::new(&buf);
31301        Self::arbitrary(&mut unstructured).unwrap_or_default()
31302    }
31303}
31304impl Default for SYS_STATUS_DATA {
31305    fn default() -> Self {
31306        Self::DEFAULT.clone()
31307    }
31308}
31309impl MessageData for SYS_STATUS_DATA {
31310    type Message = MavMessage;
31311    const ID: u32 = 1u32;
31312    const NAME: &'static str = "SYS_STATUS";
31313    const EXTRA_CRC: u8 = 124u8;
31314    const ENCODED_LEN: usize = 43usize;
31315    fn deser(
31316        _version: MavlinkVersion,
31317        __input: &[u8],
31318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31319        let avail_len = __input.len();
31320        let mut payload_buf = [0; Self::ENCODED_LEN];
31321        let mut buf = if avail_len < Self::ENCODED_LEN {
31322            payload_buf[0..avail_len].copy_from_slice(__input);
31323            Bytes::new(&payload_buf)
31324        } else {
31325            Bytes::new(__input)
31326        };
31327        let mut __struct = Self::default();
31328        let tmp = buf.get_u32_le();
31329        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
31330            tmp & MavSysStatusSensor::all().bits(),
31331        )
31332        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31333            flag_type: "MavSysStatusSensor",
31334            value: tmp as u32,
31335        })?;
31336        let tmp = buf.get_u32_le();
31337        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
31338            tmp & MavSysStatusSensor::all().bits(),
31339        )
31340        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31341            flag_type: "MavSysStatusSensor",
31342            value: tmp as u32,
31343        })?;
31344        let tmp = buf.get_u32_le();
31345        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
31346            tmp & MavSysStatusSensor::all().bits(),
31347        )
31348        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31349            flag_type: "MavSysStatusSensor",
31350            value: tmp as u32,
31351        })?;
31352        __struct.load = buf.get_u16_le();
31353        __struct.voltage_battery = buf.get_u16_le();
31354        __struct.current_battery = buf.get_i16_le();
31355        __struct.drop_rate_comm = buf.get_u16_le();
31356        __struct.errors_comm = buf.get_u16_le();
31357        __struct.errors_count1 = buf.get_u16_le();
31358        __struct.errors_count2 = buf.get_u16_le();
31359        __struct.errors_count3 = buf.get_u16_le();
31360        __struct.errors_count4 = buf.get_u16_le();
31361        __struct.battery_remaining = buf.get_i8();
31362        let tmp = buf.get_u32_le();
31363        __struct.onboard_control_sensors_present_extended =
31364            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31365                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31366                flag_type: "MavSysStatusSensorExtended",
31367                value: tmp as u32,
31368            })?;
31369        let tmp = buf.get_u32_le();
31370        __struct.onboard_control_sensors_enabled_extended =
31371            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31372                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31373                flag_type: "MavSysStatusSensorExtended",
31374                value: tmp as u32,
31375            })?;
31376        let tmp = buf.get_u32_le();
31377        __struct.onboard_control_sensors_health_extended =
31378            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
31379                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31380                flag_type: "MavSysStatusSensorExtended",
31381                value: tmp as u32,
31382            })?;
31383        Ok(__struct)
31384    }
31385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31386        let mut __tmp = BytesMut::new(bytes);
31387        #[allow(clippy::absurd_extreme_comparisons)]
31388        #[allow(unused_comparisons)]
31389        if __tmp.remaining() < Self::ENCODED_LEN {
31390            panic!(
31391                "buffer is too small (need {} bytes, but got {})",
31392                Self::ENCODED_LEN,
31393                __tmp.remaining(),
31394            )
31395        }
31396        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
31397        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
31398        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
31399        __tmp.put_u16_le(self.load);
31400        __tmp.put_u16_le(self.voltage_battery);
31401        __tmp.put_i16_le(self.current_battery);
31402        __tmp.put_u16_le(self.drop_rate_comm);
31403        __tmp.put_u16_le(self.errors_comm);
31404        __tmp.put_u16_le(self.errors_count1);
31405        __tmp.put_u16_le(self.errors_count2);
31406        __tmp.put_u16_le(self.errors_count3);
31407        __tmp.put_u16_le(self.errors_count4);
31408        __tmp.put_i8(self.battery_remaining);
31409        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
31410        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
31411        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
31412        if matches!(version, MavlinkVersion::V2) {
31413            let len = __tmp.len();
31414            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31415        } else {
31416            __tmp.len()
31417        }
31418    }
31419}
31420#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
31421#[doc = ""]
31422#[doc = "ID: 135"]
31423#[derive(Debug, Clone, PartialEq)]
31424#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31425#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31426pub struct TERRAIN_CHECK_DATA {
31427    #[doc = "Latitude"]
31428    pub lat: i32,
31429    #[doc = "Longitude"]
31430    pub lon: i32,
31431}
31432impl TERRAIN_CHECK_DATA {
31433    pub const ENCODED_LEN: usize = 8usize;
31434    pub const DEFAULT: Self = Self {
31435        lat: 0_i32,
31436        lon: 0_i32,
31437    };
31438    #[cfg(feature = "arbitrary")]
31439    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31440        use arbitrary::{Arbitrary, Unstructured};
31441        let mut buf = [0u8; 1024];
31442        rng.fill_bytes(&mut buf);
31443        let mut unstructured = Unstructured::new(&buf);
31444        Self::arbitrary(&mut unstructured).unwrap_or_default()
31445    }
31446}
31447impl Default for TERRAIN_CHECK_DATA {
31448    fn default() -> Self {
31449        Self::DEFAULT.clone()
31450    }
31451}
31452impl MessageData for TERRAIN_CHECK_DATA {
31453    type Message = MavMessage;
31454    const ID: u32 = 135u32;
31455    const NAME: &'static str = "TERRAIN_CHECK";
31456    const EXTRA_CRC: u8 = 203u8;
31457    const ENCODED_LEN: usize = 8usize;
31458    fn deser(
31459        _version: MavlinkVersion,
31460        __input: &[u8],
31461    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31462        let avail_len = __input.len();
31463        let mut payload_buf = [0; Self::ENCODED_LEN];
31464        let mut buf = if avail_len < Self::ENCODED_LEN {
31465            payload_buf[0..avail_len].copy_from_slice(__input);
31466            Bytes::new(&payload_buf)
31467        } else {
31468            Bytes::new(__input)
31469        };
31470        let mut __struct = Self::default();
31471        __struct.lat = buf.get_i32_le();
31472        __struct.lon = buf.get_i32_le();
31473        Ok(__struct)
31474    }
31475    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31476        let mut __tmp = BytesMut::new(bytes);
31477        #[allow(clippy::absurd_extreme_comparisons)]
31478        #[allow(unused_comparisons)]
31479        if __tmp.remaining() < Self::ENCODED_LEN {
31480            panic!(
31481                "buffer is too small (need {} bytes, but got {})",
31482                Self::ENCODED_LEN,
31483                __tmp.remaining(),
31484            )
31485        }
31486        __tmp.put_i32_le(self.lat);
31487        __tmp.put_i32_le(self.lon);
31488        if matches!(version, MavlinkVersion::V2) {
31489            let len = __tmp.len();
31490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31491        } else {
31492            __tmp.len()
31493        }
31494    }
31495}
31496#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31497#[doc = ""]
31498#[doc = "ID: 134"]
31499#[derive(Debug, Clone, PartialEq)]
31500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31502pub struct TERRAIN_DATA_DATA {
31503    #[doc = "Latitude of SW corner of first grid"]
31504    pub lat: i32,
31505    #[doc = "Longitude of SW corner of first grid"]
31506    pub lon: i32,
31507    #[doc = "Grid spacing"]
31508    pub grid_spacing: u16,
31509    #[doc = "Terrain data MSL"]
31510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31511    pub data: [i16; 16],
31512    #[doc = "bit within the terrain request mask"]
31513    pub gridbit: u8,
31514}
31515impl TERRAIN_DATA_DATA {
31516    pub const ENCODED_LEN: usize = 43usize;
31517    pub const DEFAULT: Self = Self {
31518        lat: 0_i32,
31519        lon: 0_i32,
31520        grid_spacing: 0_u16,
31521        data: [0_i16; 16usize],
31522        gridbit: 0_u8,
31523    };
31524    #[cfg(feature = "arbitrary")]
31525    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31526        use arbitrary::{Arbitrary, Unstructured};
31527        let mut buf = [0u8; 1024];
31528        rng.fill_bytes(&mut buf);
31529        let mut unstructured = Unstructured::new(&buf);
31530        Self::arbitrary(&mut unstructured).unwrap_or_default()
31531    }
31532}
31533impl Default for TERRAIN_DATA_DATA {
31534    fn default() -> Self {
31535        Self::DEFAULT.clone()
31536    }
31537}
31538impl MessageData for TERRAIN_DATA_DATA {
31539    type Message = MavMessage;
31540    const ID: u32 = 134u32;
31541    const NAME: &'static str = "TERRAIN_DATA";
31542    const EXTRA_CRC: u8 = 229u8;
31543    const ENCODED_LEN: usize = 43usize;
31544    fn deser(
31545        _version: MavlinkVersion,
31546        __input: &[u8],
31547    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31548        let avail_len = __input.len();
31549        let mut payload_buf = [0; Self::ENCODED_LEN];
31550        let mut buf = if avail_len < Self::ENCODED_LEN {
31551            payload_buf[0..avail_len].copy_from_slice(__input);
31552            Bytes::new(&payload_buf)
31553        } else {
31554            Bytes::new(__input)
31555        };
31556        let mut __struct = Self::default();
31557        __struct.lat = buf.get_i32_le();
31558        __struct.lon = buf.get_i32_le();
31559        __struct.grid_spacing = buf.get_u16_le();
31560        for v in &mut __struct.data {
31561            let val = buf.get_i16_le();
31562            *v = val;
31563        }
31564        __struct.gridbit = buf.get_u8();
31565        Ok(__struct)
31566    }
31567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31568        let mut __tmp = BytesMut::new(bytes);
31569        #[allow(clippy::absurd_extreme_comparisons)]
31570        #[allow(unused_comparisons)]
31571        if __tmp.remaining() < Self::ENCODED_LEN {
31572            panic!(
31573                "buffer is too small (need {} bytes, but got {})",
31574                Self::ENCODED_LEN,
31575                __tmp.remaining(),
31576            )
31577        }
31578        __tmp.put_i32_le(self.lat);
31579        __tmp.put_i32_le(self.lon);
31580        __tmp.put_u16_le(self.grid_spacing);
31581        for val in &self.data {
31582            __tmp.put_i16_le(*val);
31583        }
31584        __tmp.put_u8(self.gridbit);
31585        if matches!(version, MavlinkVersion::V2) {
31586            let len = __tmp.len();
31587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31588        } else {
31589            __tmp.len()
31590        }
31591    }
31592}
31593#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31594#[doc = ""]
31595#[doc = "ID: 136"]
31596#[derive(Debug, Clone, PartialEq)]
31597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31599pub struct TERRAIN_REPORT_DATA {
31600    #[doc = "Latitude"]
31601    pub lat: i32,
31602    #[doc = "Longitude"]
31603    pub lon: i32,
31604    #[doc = "Terrain height MSL"]
31605    pub terrain_height: f32,
31606    #[doc = "Current vehicle height above lat/lon terrain height"]
31607    pub current_height: f32,
31608    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
31609    pub spacing: u16,
31610    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
31611    pub pending: u16,
31612    #[doc = "Number of 4x4 terrain blocks in memory"]
31613    pub loaded: u16,
31614}
31615impl TERRAIN_REPORT_DATA {
31616    pub const ENCODED_LEN: usize = 22usize;
31617    pub const DEFAULT: Self = Self {
31618        lat: 0_i32,
31619        lon: 0_i32,
31620        terrain_height: 0.0_f32,
31621        current_height: 0.0_f32,
31622        spacing: 0_u16,
31623        pending: 0_u16,
31624        loaded: 0_u16,
31625    };
31626    #[cfg(feature = "arbitrary")]
31627    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31628        use arbitrary::{Arbitrary, Unstructured};
31629        let mut buf = [0u8; 1024];
31630        rng.fill_bytes(&mut buf);
31631        let mut unstructured = Unstructured::new(&buf);
31632        Self::arbitrary(&mut unstructured).unwrap_or_default()
31633    }
31634}
31635impl Default for TERRAIN_REPORT_DATA {
31636    fn default() -> Self {
31637        Self::DEFAULT.clone()
31638    }
31639}
31640impl MessageData for TERRAIN_REPORT_DATA {
31641    type Message = MavMessage;
31642    const ID: u32 = 136u32;
31643    const NAME: &'static str = "TERRAIN_REPORT";
31644    const EXTRA_CRC: u8 = 1u8;
31645    const ENCODED_LEN: usize = 22usize;
31646    fn deser(
31647        _version: MavlinkVersion,
31648        __input: &[u8],
31649    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31650        let avail_len = __input.len();
31651        let mut payload_buf = [0; Self::ENCODED_LEN];
31652        let mut buf = if avail_len < Self::ENCODED_LEN {
31653            payload_buf[0..avail_len].copy_from_slice(__input);
31654            Bytes::new(&payload_buf)
31655        } else {
31656            Bytes::new(__input)
31657        };
31658        let mut __struct = Self::default();
31659        __struct.lat = buf.get_i32_le();
31660        __struct.lon = buf.get_i32_le();
31661        __struct.terrain_height = buf.get_f32_le();
31662        __struct.current_height = buf.get_f32_le();
31663        __struct.spacing = buf.get_u16_le();
31664        __struct.pending = buf.get_u16_le();
31665        __struct.loaded = buf.get_u16_le();
31666        Ok(__struct)
31667    }
31668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31669        let mut __tmp = BytesMut::new(bytes);
31670        #[allow(clippy::absurd_extreme_comparisons)]
31671        #[allow(unused_comparisons)]
31672        if __tmp.remaining() < Self::ENCODED_LEN {
31673            panic!(
31674                "buffer is too small (need {} bytes, but got {})",
31675                Self::ENCODED_LEN,
31676                __tmp.remaining(),
31677            )
31678        }
31679        __tmp.put_i32_le(self.lat);
31680        __tmp.put_i32_le(self.lon);
31681        __tmp.put_f32_le(self.terrain_height);
31682        __tmp.put_f32_le(self.current_height);
31683        __tmp.put_u16_le(self.spacing);
31684        __tmp.put_u16_le(self.pending);
31685        __tmp.put_u16_le(self.loaded);
31686        if matches!(version, MavlinkVersion::V2) {
31687            let len = __tmp.len();
31688            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31689        } else {
31690            __tmp.len()
31691        }
31692    }
31693}
31694#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
31695#[doc = ""]
31696#[doc = "ID: 133"]
31697#[derive(Debug, Clone, PartialEq)]
31698#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31699#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31700pub struct TERRAIN_REQUEST_DATA {
31701    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
31702    pub mask: u64,
31703    #[doc = "Latitude of SW corner of first grid"]
31704    pub lat: i32,
31705    #[doc = "Longitude of SW corner of first grid"]
31706    pub lon: i32,
31707    #[doc = "Grid spacing"]
31708    pub grid_spacing: u16,
31709}
31710impl TERRAIN_REQUEST_DATA {
31711    pub const ENCODED_LEN: usize = 18usize;
31712    pub const DEFAULT: Self = Self {
31713        mask: 0_u64,
31714        lat: 0_i32,
31715        lon: 0_i32,
31716        grid_spacing: 0_u16,
31717    };
31718    #[cfg(feature = "arbitrary")]
31719    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31720        use arbitrary::{Arbitrary, Unstructured};
31721        let mut buf = [0u8; 1024];
31722        rng.fill_bytes(&mut buf);
31723        let mut unstructured = Unstructured::new(&buf);
31724        Self::arbitrary(&mut unstructured).unwrap_or_default()
31725    }
31726}
31727impl Default for TERRAIN_REQUEST_DATA {
31728    fn default() -> Self {
31729        Self::DEFAULT.clone()
31730    }
31731}
31732impl MessageData for TERRAIN_REQUEST_DATA {
31733    type Message = MavMessage;
31734    const ID: u32 = 133u32;
31735    const NAME: &'static str = "TERRAIN_REQUEST";
31736    const EXTRA_CRC: u8 = 6u8;
31737    const ENCODED_LEN: usize = 18usize;
31738    fn deser(
31739        _version: MavlinkVersion,
31740        __input: &[u8],
31741    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31742        let avail_len = __input.len();
31743        let mut payload_buf = [0; Self::ENCODED_LEN];
31744        let mut buf = if avail_len < Self::ENCODED_LEN {
31745            payload_buf[0..avail_len].copy_from_slice(__input);
31746            Bytes::new(&payload_buf)
31747        } else {
31748            Bytes::new(__input)
31749        };
31750        let mut __struct = Self::default();
31751        __struct.mask = buf.get_u64_le();
31752        __struct.lat = buf.get_i32_le();
31753        __struct.lon = buf.get_i32_le();
31754        __struct.grid_spacing = buf.get_u16_le();
31755        Ok(__struct)
31756    }
31757    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31758        let mut __tmp = BytesMut::new(bytes);
31759        #[allow(clippy::absurd_extreme_comparisons)]
31760        #[allow(unused_comparisons)]
31761        if __tmp.remaining() < Self::ENCODED_LEN {
31762            panic!(
31763                "buffer is too small (need {} bytes, but got {})",
31764                Self::ENCODED_LEN,
31765                __tmp.remaining(),
31766            )
31767        }
31768        __tmp.put_u64_le(self.mask);
31769        __tmp.put_i32_le(self.lat);
31770        __tmp.put_i32_le(self.lon);
31771        __tmp.put_u16_le(self.grid_spacing);
31772        if matches!(version, MavlinkVersion::V2) {
31773            let len = __tmp.len();
31774            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31775        } else {
31776            __tmp.len()
31777        }
31778    }
31779}
31780#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
31781#[doc = ""]
31782#[doc = "ID: 111"]
31783#[derive(Debug, Clone, PartialEq)]
31784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31786pub struct TIMESYNC_DATA {
31787    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
31788    pub tc1: i64,
31789    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
31790    pub ts1: i64,
31791    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
31792    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31793    pub target_system: u8,
31794    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
31795    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
31796    pub target_component: u8,
31797}
31798impl TIMESYNC_DATA {
31799    pub const ENCODED_LEN: usize = 18usize;
31800    pub const DEFAULT: Self = Self {
31801        tc1: 0_i64,
31802        ts1: 0_i64,
31803        target_system: 0_u8,
31804        target_component: 0_u8,
31805    };
31806    #[cfg(feature = "arbitrary")]
31807    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31808        use arbitrary::{Arbitrary, Unstructured};
31809        let mut buf = [0u8; 1024];
31810        rng.fill_bytes(&mut buf);
31811        let mut unstructured = Unstructured::new(&buf);
31812        Self::arbitrary(&mut unstructured).unwrap_or_default()
31813    }
31814}
31815impl Default for TIMESYNC_DATA {
31816    fn default() -> Self {
31817        Self::DEFAULT.clone()
31818    }
31819}
31820impl MessageData for TIMESYNC_DATA {
31821    type Message = MavMessage;
31822    const ID: u32 = 111u32;
31823    const NAME: &'static str = "TIMESYNC";
31824    const EXTRA_CRC: u8 = 34u8;
31825    const ENCODED_LEN: usize = 18usize;
31826    fn deser(
31827        _version: MavlinkVersion,
31828        __input: &[u8],
31829    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31830        let avail_len = __input.len();
31831        let mut payload_buf = [0; Self::ENCODED_LEN];
31832        let mut buf = if avail_len < Self::ENCODED_LEN {
31833            payload_buf[0..avail_len].copy_from_slice(__input);
31834            Bytes::new(&payload_buf)
31835        } else {
31836            Bytes::new(__input)
31837        };
31838        let mut __struct = Self::default();
31839        __struct.tc1 = buf.get_i64_le();
31840        __struct.ts1 = buf.get_i64_le();
31841        __struct.target_system = buf.get_u8();
31842        __struct.target_component = buf.get_u8();
31843        Ok(__struct)
31844    }
31845    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31846        let mut __tmp = BytesMut::new(bytes);
31847        #[allow(clippy::absurd_extreme_comparisons)]
31848        #[allow(unused_comparisons)]
31849        if __tmp.remaining() < Self::ENCODED_LEN {
31850            panic!(
31851                "buffer is too small (need {} bytes, but got {})",
31852                Self::ENCODED_LEN,
31853                __tmp.remaining(),
31854            )
31855        }
31856        __tmp.put_i64_le(self.tc1);
31857        __tmp.put_i64_le(self.ts1);
31858        __tmp.put_u8(self.target_system);
31859        __tmp.put_u8(self.target_component);
31860        if matches!(version, MavlinkVersion::V2) {
31861            let len = __tmp.len();
31862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31863        } else {
31864            __tmp.len()
31865        }
31866    }
31867}
31868#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
31869#[doc = ""]
31870#[doc = "ID: 380"]
31871#[derive(Debug, Clone, PartialEq)]
31872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31874pub struct TIME_ESTIMATE_TO_TARGET_DATA {
31875    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
31876    pub safe_return: i32,
31877    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
31878    pub land: i32,
31879    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
31880    pub mission_next_item: i32,
31881    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
31882    pub mission_end: i32,
31883    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
31884    pub commanded_action: i32,
31885}
31886impl TIME_ESTIMATE_TO_TARGET_DATA {
31887    pub const ENCODED_LEN: usize = 20usize;
31888    pub const DEFAULT: Self = Self {
31889        safe_return: 0_i32,
31890        land: 0_i32,
31891        mission_next_item: 0_i32,
31892        mission_end: 0_i32,
31893        commanded_action: 0_i32,
31894    };
31895    #[cfg(feature = "arbitrary")]
31896    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31897        use arbitrary::{Arbitrary, Unstructured};
31898        let mut buf = [0u8; 1024];
31899        rng.fill_bytes(&mut buf);
31900        let mut unstructured = Unstructured::new(&buf);
31901        Self::arbitrary(&mut unstructured).unwrap_or_default()
31902    }
31903}
31904impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
31905    fn default() -> Self {
31906        Self::DEFAULT.clone()
31907    }
31908}
31909impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
31910    type Message = MavMessage;
31911    const ID: u32 = 380u32;
31912    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
31913    const EXTRA_CRC: u8 = 232u8;
31914    const ENCODED_LEN: usize = 20usize;
31915    fn deser(
31916        _version: MavlinkVersion,
31917        __input: &[u8],
31918    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31919        let avail_len = __input.len();
31920        let mut payload_buf = [0; Self::ENCODED_LEN];
31921        let mut buf = if avail_len < Self::ENCODED_LEN {
31922            payload_buf[0..avail_len].copy_from_slice(__input);
31923            Bytes::new(&payload_buf)
31924        } else {
31925            Bytes::new(__input)
31926        };
31927        let mut __struct = Self::default();
31928        __struct.safe_return = buf.get_i32_le();
31929        __struct.land = buf.get_i32_le();
31930        __struct.mission_next_item = buf.get_i32_le();
31931        __struct.mission_end = buf.get_i32_le();
31932        __struct.commanded_action = buf.get_i32_le();
31933        Ok(__struct)
31934    }
31935    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31936        let mut __tmp = BytesMut::new(bytes);
31937        #[allow(clippy::absurd_extreme_comparisons)]
31938        #[allow(unused_comparisons)]
31939        if __tmp.remaining() < Self::ENCODED_LEN {
31940            panic!(
31941                "buffer is too small (need {} bytes, but got {})",
31942                Self::ENCODED_LEN,
31943                __tmp.remaining(),
31944            )
31945        }
31946        __tmp.put_i32_le(self.safe_return);
31947        __tmp.put_i32_le(self.land);
31948        __tmp.put_i32_le(self.mission_next_item);
31949        __tmp.put_i32_le(self.mission_end);
31950        __tmp.put_i32_le(self.commanded_action);
31951        if matches!(version, MavlinkVersion::V2) {
31952            let len = __tmp.len();
31953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31954        } else {
31955            __tmp.len()
31956        }
31957    }
31958}
31959#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
31960#[doc = ""]
31961#[doc = "ID: 333"]
31962#[derive(Debug, Clone, PartialEq)]
31963#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31964#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31965pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31966    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31967    pub time_usec: u64,
31968    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
31969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31970    pub pos_x: [f32; 5],
31971    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
31972    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31973    pub pos_y: [f32; 5],
31974    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
31975    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31976    pub pos_z: [f32; 5],
31977    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
31978    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31979    pub delta: [f32; 5],
31980    #[doc = "Yaw. Set to NaN for unchanged"]
31981    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31982    pub pos_yaw: [f32; 5],
31983    #[doc = "Number of valid control points (up-to 5 points are possible)"]
31984    pub valid_points: u8,
31985}
31986impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
31987    pub const ENCODED_LEN: usize = 109usize;
31988    pub const DEFAULT: Self = Self {
31989        time_usec: 0_u64,
31990        pos_x: [0.0_f32; 5usize],
31991        pos_y: [0.0_f32; 5usize],
31992        pos_z: [0.0_f32; 5usize],
31993        delta: [0.0_f32; 5usize],
31994        pos_yaw: [0.0_f32; 5usize],
31995        valid_points: 0_u8,
31996    };
31997    #[cfg(feature = "arbitrary")]
31998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31999        use arbitrary::{Arbitrary, Unstructured};
32000        let mut buf = [0u8; 1024];
32001        rng.fill_bytes(&mut buf);
32002        let mut unstructured = Unstructured::new(&buf);
32003        Self::arbitrary(&mut unstructured).unwrap_or_default()
32004    }
32005}
32006impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32007    fn default() -> Self {
32008        Self::DEFAULT.clone()
32009    }
32010}
32011impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
32012    type Message = MavMessage;
32013    const ID: u32 = 333u32;
32014    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
32015    const EXTRA_CRC: u8 = 231u8;
32016    const ENCODED_LEN: usize = 109usize;
32017    fn deser(
32018        _version: MavlinkVersion,
32019        __input: &[u8],
32020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32021        let avail_len = __input.len();
32022        let mut payload_buf = [0; Self::ENCODED_LEN];
32023        let mut buf = if avail_len < Self::ENCODED_LEN {
32024            payload_buf[0..avail_len].copy_from_slice(__input);
32025            Bytes::new(&payload_buf)
32026        } else {
32027            Bytes::new(__input)
32028        };
32029        let mut __struct = Self::default();
32030        __struct.time_usec = buf.get_u64_le();
32031        for v in &mut __struct.pos_x {
32032            let val = buf.get_f32_le();
32033            *v = val;
32034        }
32035        for v in &mut __struct.pos_y {
32036            let val = buf.get_f32_le();
32037            *v = val;
32038        }
32039        for v in &mut __struct.pos_z {
32040            let val = buf.get_f32_le();
32041            *v = val;
32042        }
32043        for v in &mut __struct.delta {
32044            let val = buf.get_f32_le();
32045            *v = val;
32046        }
32047        for v in &mut __struct.pos_yaw {
32048            let val = buf.get_f32_le();
32049            *v = val;
32050        }
32051        __struct.valid_points = buf.get_u8();
32052        Ok(__struct)
32053    }
32054    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32055        let mut __tmp = BytesMut::new(bytes);
32056        #[allow(clippy::absurd_extreme_comparisons)]
32057        #[allow(unused_comparisons)]
32058        if __tmp.remaining() < Self::ENCODED_LEN {
32059            panic!(
32060                "buffer is too small (need {} bytes, but got {})",
32061                Self::ENCODED_LEN,
32062                __tmp.remaining(),
32063            )
32064        }
32065        __tmp.put_u64_le(self.time_usec);
32066        for val in &self.pos_x {
32067            __tmp.put_f32_le(*val);
32068        }
32069        for val in &self.pos_y {
32070            __tmp.put_f32_le(*val);
32071        }
32072        for val in &self.pos_z {
32073            __tmp.put_f32_le(*val);
32074        }
32075        for val in &self.delta {
32076            __tmp.put_f32_le(*val);
32077        }
32078        for val in &self.pos_yaw {
32079            __tmp.put_f32_le(*val);
32080        }
32081        __tmp.put_u8(self.valid_points);
32082        if matches!(version, MavlinkVersion::V2) {
32083            let len = __tmp.len();
32084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32085        } else {
32086            __tmp.len()
32087        }
32088    }
32089}
32090#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
32091#[doc = ""]
32092#[doc = "ID: 332"]
32093#[derive(Debug, Clone, PartialEq)]
32094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32096pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32097    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32098    pub time_usec: u64,
32099    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
32100    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32101    pub pos_x: [f32; 5],
32102    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
32103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32104    pub pos_y: [f32; 5],
32105    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
32106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32107    pub pos_z: [f32; 5],
32108    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
32109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32110    pub vel_x: [f32; 5],
32111    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
32112    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32113    pub vel_y: [f32; 5],
32114    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
32115    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32116    pub vel_z: [f32; 5],
32117    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
32118    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32119    pub acc_x: [f32; 5],
32120    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
32121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32122    pub acc_y: [f32; 5],
32123    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
32124    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32125    pub acc_z: [f32; 5],
32126    #[doc = "Yaw angle, set to NaN if not being used"]
32127    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32128    pub pos_yaw: [f32; 5],
32129    #[doc = "Yaw rate, set to NaN if not being used"]
32130    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32131    pub vel_yaw: [f32; 5],
32132    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
32133    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32134    pub command: [u16; 5],
32135    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
32136    pub valid_points: u8,
32137}
32138impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32139    pub const ENCODED_LEN: usize = 239usize;
32140    pub const DEFAULT: Self = Self {
32141        time_usec: 0_u64,
32142        pos_x: [0.0_f32; 5usize],
32143        pos_y: [0.0_f32; 5usize],
32144        pos_z: [0.0_f32; 5usize],
32145        vel_x: [0.0_f32; 5usize],
32146        vel_y: [0.0_f32; 5usize],
32147        vel_z: [0.0_f32; 5usize],
32148        acc_x: [0.0_f32; 5usize],
32149        acc_y: [0.0_f32; 5usize],
32150        acc_z: [0.0_f32; 5usize],
32151        pos_yaw: [0.0_f32; 5usize],
32152        vel_yaw: [0.0_f32; 5usize],
32153        command: [0_u16; 5usize],
32154        valid_points: 0_u8,
32155    };
32156    #[cfg(feature = "arbitrary")]
32157    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32158        use arbitrary::{Arbitrary, Unstructured};
32159        let mut buf = [0u8; 1024];
32160        rng.fill_bytes(&mut buf);
32161        let mut unstructured = Unstructured::new(&buf);
32162        Self::arbitrary(&mut unstructured).unwrap_or_default()
32163    }
32164}
32165impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32166    fn default() -> Self {
32167        Self::DEFAULT.clone()
32168    }
32169}
32170impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
32171    type Message = MavMessage;
32172    const ID: u32 = 332u32;
32173    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
32174    const EXTRA_CRC: u8 = 236u8;
32175    const ENCODED_LEN: usize = 239usize;
32176    fn deser(
32177        _version: MavlinkVersion,
32178        __input: &[u8],
32179    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32180        let avail_len = __input.len();
32181        let mut payload_buf = [0; Self::ENCODED_LEN];
32182        let mut buf = if avail_len < Self::ENCODED_LEN {
32183            payload_buf[0..avail_len].copy_from_slice(__input);
32184            Bytes::new(&payload_buf)
32185        } else {
32186            Bytes::new(__input)
32187        };
32188        let mut __struct = Self::default();
32189        __struct.time_usec = buf.get_u64_le();
32190        for v in &mut __struct.pos_x {
32191            let val = buf.get_f32_le();
32192            *v = val;
32193        }
32194        for v in &mut __struct.pos_y {
32195            let val = buf.get_f32_le();
32196            *v = val;
32197        }
32198        for v in &mut __struct.pos_z {
32199            let val = buf.get_f32_le();
32200            *v = val;
32201        }
32202        for v in &mut __struct.vel_x {
32203            let val = buf.get_f32_le();
32204            *v = val;
32205        }
32206        for v in &mut __struct.vel_y {
32207            let val = buf.get_f32_le();
32208            *v = val;
32209        }
32210        for v in &mut __struct.vel_z {
32211            let val = buf.get_f32_le();
32212            *v = val;
32213        }
32214        for v in &mut __struct.acc_x {
32215            let val = buf.get_f32_le();
32216            *v = val;
32217        }
32218        for v in &mut __struct.acc_y {
32219            let val = buf.get_f32_le();
32220            *v = val;
32221        }
32222        for v in &mut __struct.acc_z {
32223            let val = buf.get_f32_le();
32224            *v = val;
32225        }
32226        for v in &mut __struct.pos_yaw {
32227            let val = buf.get_f32_le();
32228            *v = val;
32229        }
32230        for v in &mut __struct.vel_yaw {
32231            let val = buf.get_f32_le();
32232            *v = val;
32233        }
32234        for v in &mut __struct.command {
32235            let val = buf.get_u16_le();
32236            *v = val;
32237        }
32238        __struct.valid_points = buf.get_u8();
32239        Ok(__struct)
32240    }
32241    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32242        let mut __tmp = BytesMut::new(bytes);
32243        #[allow(clippy::absurd_extreme_comparisons)]
32244        #[allow(unused_comparisons)]
32245        if __tmp.remaining() < Self::ENCODED_LEN {
32246            panic!(
32247                "buffer is too small (need {} bytes, but got {})",
32248                Self::ENCODED_LEN,
32249                __tmp.remaining(),
32250            )
32251        }
32252        __tmp.put_u64_le(self.time_usec);
32253        for val in &self.pos_x {
32254            __tmp.put_f32_le(*val);
32255        }
32256        for val in &self.pos_y {
32257            __tmp.put_f32_le(*val);
32258        }
32259        for val in &self.pos_z {
32260            __tmp.put_f32_le(*val);
32261        }
32262        for val in &self.vel_x {
32263            __tmp.put_f32_le(*val);
32264        }
32265        for val in &self.vel_y {
32266            __tmp.put_f32_le(*val);
32267        }
32268        for val in &self.vel_z {
32269            __tmp.put_f32_le(*val);
32270        }
32271        for val in &self.acc_x {
32272            __tmp.put_f32_le(*val);
32273        }
32274        for val in &self.acc_y {
32275            __tmp.put_f32_le(*val);
32276        }
32277        for val in &self.acc_z {
32278            __tmp.put_f32_le(*val);
32279        }
32280        for val in &self.pos_yaw {
32281            __tmp.put_f32_le(*val);
32282        }
32283        for val in &self.vel_yaw {
32284            __tmp.put_f32_le(*val);
32285        }
32286        for val in &self.command {
32287            __tmp.put_u16_le(*val);
32288        }
32289        __tmp.put_u8(self.valid_points);
32290        if matches!(version, MavlinkVersion::V2) {
32291            let len = __tmp.len();
32292            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32293        } else {
32294            __tmp.len()
32295        }
32296    }
32297}
32298#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
32299#[doc = ""]
32300#[doc = "ID: 385"]
32301#[derive(Debug, Clone, PartialEq)]
32302#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32304pub struct TUNNEL_DATA {
32305    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32306    pub payload_type: MavTunnelPayloadType,
32307    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
32308    pub target_system: u8,
32309    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
32310    pub target_component: u8,
32311    #[doc = "Length of the data transported in payload"]
32312    pub payload_length: u8,
32313    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
32314    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32315    pub payload: [u8; 128],
32316}
32317impl TUNNEL_DATA {
32318    pub const ENCODED_LEN: usize = 133usize;
32319    pub const DEFAULT: Self = Self {
32320        payload_type: MavTunnelPayloadType::DEFAULT,
32321        target_system: 0_u8,
32322        target_component: 0_u8,
32323        payload_length: 0_u8,
32324        payload: [0_u8; 128usize],
32325    };
32326    #[cfg(feature = "arbitrary")]
32327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32328        use arbitrary::{Arbitrary, Unstructured};
32329        let mut buf = [0u8; 1024];
32330        rng.fill_bytes(&mut buf);
32331        let mut unstructured = Unstructured::new(&buf);
32332        Self::arbitrary(&mut unstructured).unwrap_or_default()
32333    }
32334}
32335impl Default for TUNNEL_DATA {
32336    fn default() -> Self {
32337        Self::DEFAULT.clone()
32338    }
32339}
32340impl MessageData for TUNNEL_DATA {
32341    type Message = MavMessage;
32342    const ID: u32 = 385u32;
32343    const NAME: &'static str = "TUNNEL";
32344    const EXTRA_CRC: u8 = 147u8;
32345    const ENCODED_LEN: usize = 133usize;
32346    fn deser(
32347        _version: MavlinkVersion,
32348        __input: &[u8],
32349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32350        let avail_len = __input.len();
32351        let mut payload_buf = [0; Self::ENCODED_LEN];
32352        let mut buf = if avail_len < Self::ENCODED_LEN {
32353            payload_buf[0..avail_len].copy_from_slice(__input);
32354            Bytes::new(&payload_buf)
32355        } else {
32356            Bytes::new(__input)
32357        };
32358        let mut __struct = Self::default();
32359        let tmp = buf.get_u16_le();
32360        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
32361            ::mavlink_core::error::ParserError::InvalidEnum {
32362                enum_type: "MavTunnelPayloadType",
32363                value: tmp as u32,
32364            },
32365        )?;
32366        __struct.target_system = buf.get_u8();
32367        __struct.target_component = buf.get_u8();
32368        __struct.payload_length = buf.get_u8();
32369        for v in &mut __struct.payload {
32370            let val = buf.get_u8();
32371            *v = val;
32372        }
32373        Ok(__struct)
32374    }
32375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32376        let mut __tmp = BytesMut::new(bytes);
32377        #[allow(clippy::absurd_extreme_comparisons)]
32378        #[allow(unused_comparisons)]
32379        if __tmp.remaining() < Self::ENCODED_LEN {
32380            panic!(
32381                "buffer is too small (need {} bytes, but got {})",
32382                Self::ENCODED_LEN,
32383                __tmp.remaining(),
32384            )
32385        }
32386        __tmp.put_u16_le(self.payload_type as u16);
32387        __tmp.put_u8(self.target_system);
32388        __tmp.put_u8(self.target_component);
32389        __tmp.put_u8(self.payload_length);
32390        for val in &self.payload {
32391            __tmp.put_u8(*val);
32392        }
32393        if matches!(version, MavlinkVersion::V2) {
32394            let len = __tmp.len();
32395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32396        } else {
32397            __tmp.len()
32398        }
32399    }
32400}
32401#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
32402#[doc = ""]
32403#[doc = "ID: 311"]
32404#[derive(Debug, Clone, PartialEq)]
32405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32407pub struct UAVCAN_NODE_INFO_DATA {
32408    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32409    pub time_usec: u64,
32410    #[doc = "Time since the start-up of the node."]
32411    pub uptime_sec: u32,
32412    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
32413    pub sw_vcs_commit: u32,
32414    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
32415    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32416    pub name: [u8; 80],
32417    #[doc = "Hardware major version number."]
32418    pub hw_version_major: u8,
32419    #[doc = "Hardware minor version number."]
32420    pub hw_version_minor: u8,
32421    #[doc = "Hardware unique 128-bit ID."]
32422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32423    pub hw_unique_id: [u8; 16],
32424    #[doc = "Software major version number."]
32425    pub sw_version_major: u8,
32426    #[doc = "Software minor version number."]
32427    pub sw_version_minor: u8,
32428}
32429impl UAVCAN_NODE_INFO_DATA {
32430    pub const ENCODED_LEN: usize = 116usize;
32431    pub const DEFAULT: Self = Self {
32432        time_usec: 0_u64,
32433        uptime_sec: 0_u32,
32434        sw_vcs_commit: 0_u32,
32435        name: [0_u8; 80usize],
32436        hw_version_major: 0_u8,
32437        hw_version_minor: 0_u8,
32438        hw_unique_id: [0_u8; 16usize],
32439        sw_version_major: 0_u8,
32440        sw_version_minor: 0_u8,
32441    };
32442    #[cfg(feature = "arbitrary")]
32443    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32444        use arbitrary::{Arbitrary, Unstructured};
32445        let mut buf = [0u8; 1024];
32446        rng.fill_bytes(&mut buf);
32447        let mut unstructured = Unstructured::new(&buf);
32448        Self::arbitrary(&mut unstructured).unwrap_or_default()
32449    }
32450}
32451impl Default for UAVCAN_NODE_INFO_DATA {
32452    fn default() -> Self {
32453        Self::DEFAULT.clone()
32454    }
32455}
32456impl MessageData for UAVCAN_NODE_INFO_DATA {
32457    type Message = MavMessage;
32458    const ID: u32 = 311u32;
32459    const NAME: &'static str = "UAVCAN_NODE_INFO";
32460    const EXTRA_CRC: u8 = 95u8;
32461    const ENCODED_LEN: usize = 116usize;
32462    fn deser(
32463        _version: MavlinkVersion,
32464        __input: &[u8],
32465    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32466        let avail_len = __input.len();
32467        let mut payload_buf = [0; Self::ENCODED_LEN];
32468        let mut buf = if avail_len < Self::ENCODED_LEN {
32469            payload_buf[0..avail_len].copy_from_slice(__input);
32470            Bytes::new(&payload_buf)
32471        } else {
32472            Bytes::new(__input)
32473        };
32474        let mut __struct = Self::default();
32475        __struct.time_usec = buf.get_u64_le();
32476        __struct.uptime_sec = buf.get_u32_le();
32477        __struct.sw_vcs_commit = buf.get_u32_le();
32478        for v in &mut __struct.name {
32479            let val = buf.get_u8();
32480            *v = val;
32481        }
32482        __struct.hw_version_major = buf.get_u8();
32483        __struct.hw_version_minor = buf.get_u8();
32484        for v in &mut __struct.hw_unique_id {
32485            let val = buf.get_u8();
32486            *v = val;
32487        }
32488        __struct.sw_version_major = buf.get_u8();
32489        __struct.sw_version_minor = buf.get_u8();
32490        Ok(__struct)
32491    }
32492    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32493        let mut __tmp = BytesMut::new(bytes);
32494        #[allow(clippy::absurd_extreme_comparisons)]
32495        #[allow(unused_comparisons)]
32496        if __tmp.remaining() < Self::ENCODED_LEN {
32497            panic!(
32498                "buffer is too small (need {} bytes, but got {})",
32499                Self::ENCODED_LEN,
32500                __tmp.remaining(),
32501            )
32502        }
32503        __tmp.put_u64_le(self.time_usec);
32504        __tmp.put_u32_le(self.uptime_sec);
32505        __tmp.put_u32_le(self.sw_vcs_commit);
32506        for val in &self.name {
32507            __tmp.put_u8(*val);
32508        }
32509        __tmp.put_u8(self.hw_version_major);
32510        __tmp.put_u8(self.hw_version_minor);
32511        for val in &self.hw_unique_id {
32512            __tmp.put_u8(*val);
32513        }
32514        __tmp.put_u8(self.sw_version_major);
32515        __tmp.put_u8(self.sw_version_minor);
32516        if matches!(version, MavlinkVersion::V2) {
32517            let len = __tmp.len();
32518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32519        } else {
32520            __tmp.len()
32521        }
32522    }
32523}
32524#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
32525#[doc = ""]
32526#[doc = "ID: 310"]
32527#[derive(Debug, Clone, PartialEq)]
32528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32530pub struct UAVCAN_NODE_STATUS_DATA {
32531    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
32532    pub time_usec: u64,
32533    #[doc = "Time since the start-up of the node."]
32534    pub uptime_sec: u32,
32535    #[doc = "Vendor-specific status information."]
32536    pub vendor_specific_status_code: u16,
32537    #[doc = "Generalized node health status."]
32538    pub health: UavcanNodeHealth,
32539    #[doc = "Generalized operating mode."]
32540    pub mode: UavcanNodeMode,
32541    #[doc = "Not used currently."]
32542    pub sub_mode: u8,
32543}
32544impl UAVCAN_NODE_STATUS_DATA {
32545    pub const ENCODED_LEN: usize = 17usize;
32546    pub const DEFAULT: Self = Self {
32547        time_usec: 0_u64,
32548        uptime_sec: 0_u32,
32549        vendor_specific_status_code: 0_u16,
32550        health: UavcanNodeHealth::DEFAULT,
32551        mode: UavcanNodeMode::DEFAULT,
32552        sub_mode: 0_u8,
32553    };
32554    #[cfg(feature = "arbitrary")]
32555    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32556        use arbitrary::{Arbitrary, Unstructured};
32557        let mut buf = [0u8; 1024];
32558        rng.fill_bytes(&mut buf);
32559        let mut unstructured = Unstructured::new(&buf);
32560        Self::arbitrary(&mut unstructured).unwrap_or_default()
32561    }
32562}
32563impl Default for UAVCAN_NODE_STATUS_DATA {
32564    fn default() -> Self {
32565        Self::DEFAULT.clone()
32566    }
32567}
32568impl MessageData for UAVCAN_NODE_STATUS_DATA {
32569    type Message = MavMessage;
32570    const ID: u32 = 310u32;
32571    const NAME: &'static str = "UAVCAN_NODE_STATUS";
32572    const EXTRA_CRC: u8 = 28u8;
32573    const ENCODED_LEN: usize = 17usize;
32574    fn deser(
32575        _version: MavlinkVersion,
32576        __input: &[u8],
32577    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32578        let avail_len = __input.len();
32579        let mut payload_buf = [0; Self::ENCODED_LEN];
32580        let mut buf = if avail_len < Self::ENCODED_LEN {
32581            payload_buf[0..avail_len].copy_from_slice(__input);
32582            Bytes::new(&payload_buf)
32583        } else {
32584            Bytes::new(__input)
32585        };
32586        let mut __struct = Self::default();
32587        __struct.time_usec = buf.get_u64_le();
32588        __struct.uptime_sec = buf.get_u32_le();
32589        __struct.vendor_specific_status_code = buf.get_u16_le();
32590        let tmp = buf.get_u8();
32591        __struct.health =
32592            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32593                enum_type: "UavcanNodeHealth",
32594                value: tmp as u32,
32595            })?;
32596        let tmp = buf.get_u8();
32597        __struct.mode =
32598            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32599                enum_type: "UavcanNodeMode",
32600                value: tmp as u32,
32601            })?;
32602        __struct.sub_mode = buf.get_u8();
32603        Ok(__struct)
32604    }
32605    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32606        let mut __tmp = BytesMut::new(bytes);
32607        #[allow(clippy::absurd_extreme_comparisons)]
32608        #[allow(unused_comparisons)]
32609        if __tmp.remaining() < Self::ENCODED_LEN {
32610            panic!(
32611                "buffer is too small (need {} bytes, but got {})",
32612                Self::ENCODED_LEN,
32613                __tmp.remaining(),
32614            )
32615        }
32616        __tmp.put_u64_le(self.time_usec);
32617        __tmp.put_u32_le(self.uptime_sec);
32618        __tmp.put_u16_le(self.vendor_specific_status_code);
32619        __tmp.put_u8(self.health as u8);
32620        __tmp.put_u8(self.mode as u8);
32621        __tmp.put_u8(self.sub_mode);
32622        if matches!(version, MavlinkVersion::V2) {
32623            let len = __tmp.len();
32624            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32625        } else {
32626            __tmp.len()
32627        }
32628    }
32629}
32630#[doc = "The global position resulting from GPS and sensor fusion."]
32631#[doc = ""]
32632#[doc = "ID: 340"]
32633#[derive(Debug, Clone, PartialEq)]
32634#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32635#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32636pub struct UTM_GLOBAL_POSITION_DATA {
32637    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
32638    pub time: u64,
32639    #[doc = "Latitude (WGS84)"]
32640    pub lat: i32,
32641    #[doc = "Longitude (WGS84)"]
32642    pub lon: i32,
32643    #[doc = "Altitude (WGS84)"]
32644    pub alt: i32,
32645    #[doc = "Altitude above ground"]
32646    pub relative_alt: i32,
32647    #[doc = "Next waypoint, latitude (WGS84)"]
32648    pub next_lat: i32,
32649    #[doc = "Next waypoint, longitude (WGS84)"]
32650    pub next_lon: i32,
32651    #[doc = "Next waypoint, altitude (WGS84)"]
32652    pub next_alt: i32,
32653    #[doc = "Ground X speed (latitude, positive north)"]
32654    pub vx: i16,
32655    #[doc = "Ground Y speed (longitude, positive east)"]
32656    pub vy: i16,
32657    #[doc = "Ground Z speed (altitude, positive down)"]
32658    pub vz: i16,
32659    #[doc = "Horizontal position uncertainty (standard deviation)"]
32660    pub h_acc: u16,
32661    #[doc = "Altitude uncertainty (standard deviation)"]
32662    pub v_acc: u16,
32663    #[doc = "Speed uncertainty (standard deviation)"]
32664    pub vel_acc: u16,
32665    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
32666    pub update_rate: u16,
32667    #[doc = "Unique UAS ID."]
32668    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32669    pub uas_id: [u8; 18],
32670    #[doc = "Flight state"]
32671    pub flight_state: UtmFlightState,
32672    #[doc = "Bitwise OR combination of the data available flags."]
32673    pub flags: UtmDataAvailFlags,
32674}
32675impl UTM_GLOBAL_POSITION_DATA {
32676    pub const ENCODED_LEN: usize = 70usize;
32677    pub const DEFAULT: Self = Self {
32678        time: 0_u64,
32679        lat: 0_i32,
32680        lon: 0_i32,
32681        alt: 0_i32,
32682        relative_alt: 0_i32,
32683        next_lat: 0_i32,
32684        next_lon: 0_i32,
32685        next_alt: 0_i32,
32686        vx: 0_i16,
32687        vy: 0_i16,
32688        vz: 0_i16,
32689        h_acc: 0_u16,
32690        v_acc: 0_u16,
32691        vel_acc: 0_u16,
32692        update_rate: 0_u16,
32693        uas_id: [0_u8; 18usize],
32694        flight_state: UtmFlightState::DEFAULT,
32695        flags: UtmDataAvailFlags::DEFAULT,
32696    };
32697    #[cfg(feature = "arbitrary")]
32698    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32699        use arbitrary::{Arbitrary, Unstructured};
32700        let mut buf = [0u8; 1024];
32701        rng.fill_bytes(&mut buf);
32702        let mut unstructured = Unstructured::new(&buf);
32703        Self::arbitrary(&mut unstructured).unwrap_or_default()
32704    }
32705}
32706impl Default for UTM_GLOBAL_POSITION_DATA {
32707    fn default() -> Self {
32708        Self::DEFAULT.clone()
32709    }
32710}
32711impl MessageData for UTM_GLOBAL_POSITION_DATA {
32712    type Message = MavMessage;
32713    const ID: u32 = 340u32;
32714    const NAME: &'static str = "UTM_GLOBAL_POSITION";
32715    const EXTRA_CRC: u8 = 99u8;
32716    const ENCODED_LEN: usize = 70usize;
32717    fn deser(
32718        _version: MavlinkVersion,
32719        __input: &[u8],
32720    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32721        let avail_len = __input.len();
32722        let mut payload_buf = [0; Self::ENCODED_LEN];
32723        let mut buf = if avail_len < Self::ENCODED_LEN {
32724            payload_buf[0..avail_len].copy_from_slice(__input);
32725            Bytes::new(&payload_buf)
32726        } else {
32727            Bytes::new(__input)
32728        };
32729        let mut __struct = Self::default();
32730        __struct.time = buf.get_u64_le();
32731        __struct.lat = buf.get_i32_le();
32732        __struct.lon = buf.get_i32_le();
32733        __struct.alt = buf.get_i32_le();
32734        __struct.relative_alt = buf.get_i32_le();
32735        __struct.next_lat = buf.get_i32_le();
32736        __struct.next_lon = buf.get_i32_le();
32737        __struct.next_alt = buf.get_i32_le();
32738        __struct.vx = buf.get_i16_le();
32739        __struct.vy = buf.get_i16_le();
32740        __struct.vz = buf.get_i16_le();
32741        __struct.h_acc = buf.get_u16_le();
32742        __struct.v_acc = buf.get_u16_le();
32743        __struct.vel_acc = buf.get_u16_le();
32744        __struct.update_rate = buf.get_u16_le();
32745        for v in &mut __struct.uas_id {
32746            let val = buf.get_u8();
32747            *v = val;
32748        }
32749        let tmp = buf.get_u8();
32750        __struct.flight_state =
32751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
32752                enum_type: "UtmFlightState",
32753                value: tmp as u32,
32754            })?;
32755        let tmp = buf.get_u8();
32756        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
32757            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
32758                flag_type: "UtmDataAvailFlags",
32759                value: tmp as u32,
32760            })?;
32761        Ok(__struct)
32762    }
32763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32764        let mut __tmp = BytesMut::new(bytes);
32765        #[allow(clippy::absurd_extreme_comparisons)]
32766        #[allow(unused_comparisons)]
32767        if __tmp.remaining() < Self::ENCODED_LEN {
32768            panic!(
32769                "buffer is too small (need {} bytes, but got {})",
32770                Self::ENCODED_LEN,
32771                __tmp.remaining(),
32772            )
32773        }
32774        __tmp.put_u64_le(self.time);
32775        __tmp.put_i32_le(self.lat);
32776        __tmp.put_i32_le(self.lon);
32777        __tmp.put_i32_le(self.alt);
32778        __tmp.put_i32_le(self.relative_alt);
32779        __tmp.put_i32_le(self.next_lat);
32780        __tmp.put_i32_le(self.next_lon);
32781        __tmp.put_i32_le(self.next_alt);
32782        __tmp.put_i16_le(self.vx);
32783        __tmp.put_i16_le(self.vy);
32784        __tmp.put_i16_le(self.vz);
32785        __tmp.put_u16_le(self.h_acc);
32786        __tmp.put_u16_le(self.v_acc);
32787        __tmp.put_u16_le(self.vel_acc);
32788        __tmp.put_u16_le(self.update_rate);
32789        for val in &self.uas_id {
32790            __tmp.put_u8(*val);
32791        }
32792        __tmp.put_u8(self.flight_state as u8);
32793        __tmp.put_u8(self.flags.bits());
32794        if matches!(version, MavlinkVersion::V2) {
32795            let len = __tmp.len();
32796            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32797        } else {
32798            __tmp.len()
32799        }
32800    }
32801}
32802#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
32803#[doc = ""]
32804#[doc = "ID: 248"]
32805#[derive(Debug, Clone, PartialEq)]
32806#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32807#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32808pub struct V2_EXTENSION_DATA {
32809    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
32810    pub message_type: u16,
32811    #[doc = "Network ID (0 for broadcast)"]
32812    pub target_network: u8,
32813    #[doc = "System ID (0 for broadcast)"]
32814    pub target_system: u8,
32815    #[doc = "Component ID (0 for broadcast)"]
32816    pub target_component: u8,
32817    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
32818    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
32819    pub payload: [u8; 249],
32820}
32821impl V2_EXTENSION_DATA {
32822    pub const ENCODED_LEN: usize = 254usize;
32823    pub const DEFAULT: Self = Self {
32824        message_type: 0_u16,
32825        target_network: 0_u8,
32826        target_system: 0_u8,
32827        target_component: 0_u8,
32828        payload: [0_u8; 249usize],
32829    };
32830    #[cfg(feature = "arbitrary")]
32831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32832        use arbitrary::{Arbitrary, Unstructured};
32833        let mut buf = [0u8; 1024];
32834        rng.fill_bytes(&mut buf);
32835        let mut unstructured = Unstructured::new(&buf);
32836        Self::arbitrary(&mut unstructured).unwrap_or_default()
32837    }
32838}
32839impl Default for V2_EXTENSION_DATA {
32840    fn default() -> Self {
32841        Self::DEFAULT.clone()
32842    }
32843}
32844impl MessageData for V2_EXTENSION_DATA {
32845    type Message = MavMessage;
32846    const ID: u32 = 248u32;
32847    const NAME: &'static str = "V2_EXTENSION";
32848    const EXTRA_CRC: u8 = 8u8;
32849    const ENCODED_LEN: usize = 254usize;
32850    fn deser(
32851        _version: MavlinkVersion,
32852        __input: &[u8],
32853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32854        let avail_len = __input.len();
32855        let mut payload_buf = [0; Self::ENCODED_LEN];
32856        let mut buf = if avail_len < Self::ENCODED_LEN {
32857            payload_buf[0..avail_len].copy_from_slice(__input);
32858            Bytes::new(&payload_buf)
32859        } else {
32860            Bytes::new(__input)
32861        };
32862        let mut __struct = Self::default();
32863        __struct.message_type = buf.get_u16_le();
32864        __struct.target_network = buf.get_u8();
32865        __struct.target_system = buf.get_u8();
32866        __struct.target_component = buf.get_u8();
32867        for v in &mut __struct.payload {
32868            let val = buf.get_u8();
32869            *v = val;
32870        }
32871        Ok(__struct)
32872    }
32873    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32874        let mut __tmp = BytesMut::new(bytes);
32875        #[allow(clippy::absurd_extreme_comparisons)]
32876        #[allow(unused_comparisons)]
32877        if __tmp.remaining() < Self::ENCODED_LEN {
32878            panic!(
32879                "buffer is too small (need {} bytes, but got {})",
32880                Self::ENCODED_LEN,
32881                __tmp.remaining(),
32882            )
32883        }
32884        __tmp.put_u16_le(self.message_type);
32885        __tmp.put_u8(self.target_network);
32886        __tmp.put_u8(self.target_system);
32887        __tmp.put_u8(self.target_component);
32888        for val in &self.payload {
32889            __tmp.put_u8(*val);
32890        }
32891        if matches!(version, MavlinkVersion::V2) {
32892            let len = __tmp.len();
32893            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32894        } else {
32895            __tmp.len()
32896        }
32897    }
32898}
32899#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
32900#[doc = ""]
32901#[doc = "ID: 74"]
32902#[derive(Debug, Clone, PartialEq)]
32903#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
32904#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
32905pub struct VFR_HUD_DATA {
32906    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
32907    pub airspeed: f32,
32908    #[doc = "Current ground speed."]
32909    pub groundspeed: f32,
32910    #[doc = "Current altitude (MSL)."]
32911    pub alt: f32,
32912    #[doc = "Current climb rate."]
32913    pub climb: f32,
32914    #[doc = "Current heading in compass units (0-360, 0=north)."]
32915    pub heading: i16,
32916    #[doc = "Current throttle setting (0 to 100)."]
32917    pub throttle: u16,
32918}
32919impl VFR_HUD_DATA {
32920    pub const ENCODED_LEN: usize = 20usize;
32921    pub const DEFAULT: Self = Self {
32922        airspeed: 0.0_f32,
32923        groundspeed: 0.0_f32,
32924        alt: 0.0_f32,
32925        climb: 0.0_f32,
32926        heading: 0_i16,
32927        throttle: 0_u16,
32928    };
32929    #[cfg(feature = "arbitrary")]
32930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
32931        use arbitrary::{Arbitrary, Unstructured};
32932        let mut buf = [0u8; 1024];
32933        rng.fill_bytes(&mut buf);
32934        let mut unstructured = Unstructured::new(&buf);
32935        Self::arbitrary(&mut unstructured).unwrap_or_default()
32936    }
32937}
32938impl Default for VFR_HUD_DATA {
32939    fn default() -> Self {
32940        Self::DEFAULT.clone()
32941    }
32942}
32943impl MessageData for VFR_HUD_DATA {
32944    type Message = MavMessage;
32945    const ID: u32 = 74u32;
32946    const NAME: &'static str = "VFR_HUD";
32947    const EXTRA_CRC: u8 = 20u8;
32948    const ENCODED_LEN: usize = 20usize;
32949    fn deser(
32950        _version: MavlinkVersion,
32951        __input: &[u8],
32952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
32953        let avail_len = __input.len();
32954        let mut payload_buf = [0; Self::ENCODED_LEN];
32955        let mut buf = if avail_len < Self::ENCODED_LEN {
32956            payload_buf[0..avail_len].copy_from_slice(__input);
32957            Bytes::new(&payload_buf)
32958        } else {
32959            Bytes::new(__input)
32960        };
32961        let mut __struct = Self::default();
32962        __struct.airspeed = buf.get_f32_le();
32963        __struct.groundspeed = buf.get_f32_le();
32964        __struct.alt = buf.get_f32_le();
32965        __struct.climb = buf.get_f32_le();
32966        __struct.heading = buf.get_i16_le();
32967        __struct.throttle = buf.get_u16_le();
32968        Ok(__struct)
32969    }
32970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
32971        let mut __tmp = BytesMut::new(bytes);
32972        #[allow(clippy::absurd_extreme_comparisons)]
32973        #[allow(unused_comparisons)]
32974        if __tmp.remaining() < Self::ENCODED_LEN {
32975            panic!(
32976                "buffer is too small (need {} bytes, but got {})",
32977                Self::ENCODED_LEN,
32978                __tmp.remaining(),
32979            )
32980        }
32981        __tmp.put_f32_le(self.airspeed);
32982        __tmp.put_f32_le(self.groundspeed);
32983        __tmp.put_f32_le(self.alt);
32984        __tmp.put_f32_le(self.climb);
32985        __tmp.put_i16_le(self.heading);
32986        __tmp.put_u16_le(self.throttle);
32987        if matches!(version, MavlinkVersion::V2) {
32988            let len = __tmp.len();
32989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
32990        } else {
32991            __tmp.len()
32992        }
32993    }
32994}
32995#[doc = "Vibration levels and accelerometer clipping."]
32996#[doc = ""]
32997#[doc = "ID: 241"]
32998#[derive(Debug, Clone, PartialEq)]
32999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33001pub struct VIBRATION_DATA {
33002    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
33003    pub time_usec: u64,
33004    #[doc = "Vibration levels on X-axis"]
33005    pub vibration_x: f32,
33006    #[doc = "Vibration levels on Y-axis"]
33007    pub vibration_y: f32,
33008    #[doc = "Vibration levels on Z-axis"]
33009    pub vibration_z: f32,
33010    #[doc = "first accelerometer clipping count"]
33011    pub clipping_0: u32,
33012    #[doc = "second accelerometer clipping count"]
33013    pub clipping_1: u32,
33014    #[doc = "third accelerometer clipping count"]
33015    pub clipping_2: u32,
33016}
33017impl VIBRATION_DATA {
33018    pub const ENCODED_LEN: usize = 32usize;
33019    pub const DEFAULT: Self = Self {
33020        time_usec: 0_u64,
33021        vibration_x: 0.0_f32,
33022        vibration_y: 0.0_f32,
33023        vibration_z: 0.0_f32,
33024        clipping_0: 0_u32,
33025        clipping_1: 0_u32,
33026        clipping_2: 0_u32,
33027    };
33028    #[cfg(feature = "arbitrary")]
33029    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33030        use arbitrary::{Arbitrary, Unstructured};
33031        let mut buf = [0u8; 1024];
33032        rng.fill_bytes(&mut buf);
33033        let mut unstructured = Unstructured::new(&buf);
33034        Self::arbitrary(&mut unstructured).unwrap_or_default()
33035    }
33036}
33037impl Default for VIBRATION_DATA {
33038    fn default() -> Self {
33039        Self::DEFAULT.clone()
33040    }
33041}
33042impl MessageData for VIBRATION_DATA {
33043    type Message = MavMessage;
33044    const ID: u32 = 241u32;
33045    const NAME: &'static str = "VIBRATION";
33046    const EXTRA_CRC: u8 = 90u8;
33047    const ENCODED_LEN: usize = 32usize;
33048    fn deser(
33049        _version: MavlinkVersion,
33050        __input: &[u8],
33051    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33052        let avail_len = __input.len();
33053        let mut payload_buf = [0; Self::ENCODED_LEN];
33054        let mut buf = if avail_len < Self::ENCODED_LEN {
33055            payload_buf[0..avail_len].copy_from_slice(__input);
33056            Bytes::new(&payload_buf)
33057        } else {
33058            Bytes::new(__input)
33059        };
33060        let mut __struct = Self::default();
33061        __struct.time_usec = buf.get_u64_le();
33062        __struct.vibration_x = buf.get_f32_le();
33063        __struct.vibration_y = buf.get_f32_le();
33064        __struct.vibration_z = buf.get_f32_le();
33065        __struct.clipping_0 = buf.get_u32_le();
33066        __struct.clipping_1 = buf.get_u32_le();
33067        __struct.clipping_2 = buf.get_u32_le();
33068        Ok(__struct)
33069    }
33070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33071        let mut __tmp = BytesMut::new(bytes);
33072        #[allow(clippy::absurd_extreme_comparisons)]
33073        #[allow(unused_comparisons)]
33074        if __tmp.remaining() < Self::ENCODED_LEN {
33075            panic!(
33076                "buffer is too small (need {} bytes, but got {})",
33077                Self::ENCODED_LEN,
33078                __tmp.remaining(),
33079            )
33080        }
33081        __tmp.put_u64_le(self.time_usec);
33082        __tmp.put_f32_le(self.vibration_x);
33083        __tmp.put_f32_le(self.vibration_y);
33084        __tmp.put_f32_le(self.vibration_z);
33085        __tmp.put_u32_le(self.clipping_0);
33086        __tmp.put_u32_le(self.clipping_1);
33087        __tmp.put_u32_le(self.clipping_2);
33088        if matches!(version, MavlinkVersion::V2) {
33089            let len = __tmp.len();
33090            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33091        } else {
33092            __tmp.len()
33093        }
33094    }
33095}
33096#[doc = "Global position estimate from a Vicon motion system source."]
33097#[doc = ""]
33098#[doc = "ID: 104"]
33099#[derive(Debug, Clone, PartialEq)]
33100#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33102pub struct VICON_POSITION_ESTIMATE_DATA {
33103    #[doc = "Timestamp (UNIX time or time since system boot)"]
33104    pub usec: u64,
33105    #[doc = "Global X position"]
33106    pub x: f32,
33107    #[doc = "Global Y position"]
33108    pub y: f32,
33109    #[doc = "Global Z position"]
33110    pub z: f32,
33111    #[doc = "Roll angle"]
33112    pub roll: f32,
33113    #[doc = "Pitch angle"]
33114    pub pitch: f32,
33115    #[doc = "Yaw angle"]
33116    pub yaw: f32,
33117    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33118    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33120    pub covariance: [f32; 21],
33121}
33122impl VICON_POSITION_ESTIMATE_DATA {
33123    pub const ENCODED_LEN: usize = 116usize;
33124    pub const DEFAULT: Self = Self {
33125        usec: 0_u64,
33126        x: 0.0_f32,
33127        y: 0.0_f32,
33128        z: 0.0_f32,
33129        roll: 0.0_f32,
33130        pitch: 0.0_f32,
33131        yaw: 0.0_f32,
33132        covariance: [0.0_f32; 21usize],
33133    };
33134    #[cfg(feature = "arbitrary")]
33135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33136        use arbitrary::{Arbitrary, Unstructured};
33137        let mut buf = [0u8; 1024];
33138        rng.fill_bytes(&mut buf);
33139        let mut unstructured = Unstructured::new(&buf);
33140        Self::arbitrary(&mut unstructured).unwrap_or_default()
33141    }
33142}
33143impl Default for VICON_POSITION_ESTIMATE_DATA {
33144    fn default() -> Self {
33145        Self::DEFAULT.clone()
33146    }
33147}
33148impl MessageData for VICON_POSITION_ESTIMATE_DATA {
33149    type Message = MavMessage;
33150    const ID: u32 = 104u32;
33151    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
33152    const EXTRA_CRC: u8 = 56u8;
33153    const ENCODED_LEN: usize = 116usize;
33154    fn deser(
33155        _version: MavlinkVersion,
33156        __input: &[u8],
33157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33158        let avail_len = __input.len();
33159        let mut payload_buf = [0; Self::ENCODED_LEN];
33160        let mut buf = if avail_len < Self::ENCODED_LEN {
33161            payload_buf[0..avail_len].copy_from_slice(__input);
33162            Bytes::new(&payload_buf)
33163        } else {
33164            Bytes::new(__input)
33165        };
33166        let mut __struct = Self::default();
33167        __struct.usec = buf.get_u64_le();
33168        __struct.x = buf.get_f32_le();
33169        __struct.y = buf.get_f32_le();
33170        __struct.z = buf.get_f32_le();
33171        __struct.roll = buf.get_f32_le();
33172        __struct.pitch = buf.get_f32_le();
33173        __struct.yaw = buf.get_f32_le();
33174        for v in &mut __struct.covariance {
33175            let val = buf.get_f32_le();
33176            *v = val;
33177        }
33178        Ok(__struct)
33179    }
33180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33181        let mut __tmp = BytesMut::new(bytes);
33182        #[allow(clippy::absurd_extreme_comparisons)]
33183        #[allow(unused_comparisons)]
33184        if __tmp.remaining() < Self::ENCODED_LEN {
33185            panic!(
33186                "buffer is too small (need {} bytes, but got {})",
33187                Self::ENCODED_LEN,
33188                __tmp.remaining(),
33189            )
33190        }
33191        __tmp.put_u64_le(self.usec);
33192        __tmp.put_f32_le(self.x);
33193        __tmp.put_f32_le(self.y);
33194        __tmp.put_f32_le(self.z);
33195        __tmp.put_f32_le(self.roll);
33196        __tmp.put_f32_le(self.pitch);
33197        __tmp.put_f32_le(self.yaw);
33198        for val in &self.covariance {
33199            __tmp.put_f32_le(*val);
33200        }
33201        if matches!(version, MavlinkVersion::V2) {
33202            let len = __tmp.len();
33203            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33204        } else {
33205            __tmp.len()
33206        }
33207    }
33208}
33209#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
33210#[doc = ""]
33211#[doc = "ID: 269"]
33212#[derive(Debug, Clone, PartialEq)]
33213#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33214#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33215pub struct VIDEO_STREAM_INFORMATION_DATA {
33216    #[doc = "Frame rate."]
33217    pub framerate: f32,
33218    #[doc = "Bit rate."]
33219    pub bitrate: u32,
33220    #[doc = "Bitmap of stream status flags."]
33221    pub flags: VideoStreamStatusFlags,
33222    #[doc = "Horizontal resolution."]
33223    pub resolution_h: u16,
33224    #[doc = "Vertical resolution."]
33225    pub resolution_v: u16,
33226    #[doc = "Video image rotation clockwise."]
33227    pub rotation: u16,
33228    #[doc = "Horizontal Field of view."]
33229    pub hfov: u16,
33230    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33231    pub stream_id: u8,
33232    #[doc = "Number of streams available."]
33233    pub count: u8,
33234    #[doc = "Type of stream."]
33235    pub mavtype: VideoStreamType,
33236    #[doc = "Stream name."]
33237    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33238    pub name: [u8; 32],
33239    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
33240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33241    pub uri: [u8; 160],
33242    #[doc = "Encoding of stream."]
33243    #[cfg_attr(feature = "serde", serde(default))]
33244    pub encoding: VideoStreamEncoding,
33245    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33246    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33247    pub camera_device_id: u8,
33248}
33249impl VIDEO_STREAM_INFORMATION_DATA {
33250    pub const ENCODED_LEN: usize = 215usize;
33251    pub const DEFAULT: Self = Self {
33252        framerate: 0.0_f32,
33253        bitrate: 0_u32,
33254        flags: VideoStreamStatusFlags::DEFAULT,
33255        resolution_h: 0_u16,
33256        resolution_v: 0_u16,
33257        rotation: 0_u16,
33258        hfov: 0_u16,
33259        stream_id: 0_u8,
33260        count: 0_u8,
33261        mavtype: VideoStreamType::DEFAULT,
33262        name: [0_u8; 32usize],
33263        uri: [0_u8; 160usize],
33264        encoding: VideoStreamEncoding::DEFAULT,
33265        camera_device_id: 0_u8,
33266    };
33267    #[cfg(feature = "arbitrary")]
33268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33269        use arbitrary::{Arbitrary, Unstructured};
33270        let mut buf = [0u8; 1024];
33271        rng.fill_bytes(&mut buf);
33272        let mut unstructured = Unstructured::new(&buf);
33273        Self::arbitrary(&mut unstructured).unwrap_or_default()
33274    }
33275}
33276impl Default for VIDEO_STREAM_INFORMATION_DATA {
33277    fn default() -> Self {
33278        Self::DEFAULT.clone()
33279    }
33280}
33281impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
33282    type Message = MavMessage;
33283    const ID: u32 = 269u32;
33284    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
33285    const EXTRA_CRC: u8 = 109u8;
33286    const ENCODED_LEN: usize = 215usize;
33287    fn deser(
33288        _version: MavlinkVersion,
33289        __input: &[u8],
33290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33291        let avail_len = __input.len();
33292        let mut payload_buf = [0; Self::ENCODED_LEN];
33293        let mut buf = if avail_len < Self::ENCODED_LEN {
33294            payload_buf[0..avail_len].copy_from_slice(__input);
33295            Bytes::new(&payload_buf)
33296        } else {
33297            Bytes::new(__input)
33298        };
33299        let mut __struct = Self::default();
33300        __struct.framerate = buf.get_f32_le();
33301        __struct.bitrate = buf.get_u32_le();
33302        let tmp = buf.get_u16_le();
33303        __struct.flags = VideoStreamStatusFlags::from_bits(
33304            tmp & VideoStreamStatusFlags::all().bits(),
33305        )
33306        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33307            flag_type: "VideoStreamStatusFlags",
33308            value: tmp as u32,
33309        })?;
33310        __struct.resolution_h = buf.get_u16_le();
33311        __struct.resolution_v = buf.get_u16_le();
33312        __struct.rotation = buf.get_u16_le();
33313        __struct.hfov = buf.get_u16_le();
33314        __struct.stream_id = buf.get_u8();
33315        __struct.count = buf.get_u8();
33316        let tmp = buf.get_u8();
33317        __struct.mavtype =
33318            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33319                enum_type: "VideoStreamType",
33320                value: tmp as u32,
33321            })?;
33322        for v in &mut __struct.name {
33323            let val = buf.get_u8();
33324            *v = val;
33325        }
33326        for v in &mut __struct.uri {
33327            let val = buf.get_u8();
33328            *v = val;
33329        }
33330        let tmp = buf.get_u8();
33331        __struct.encoding =
33332            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33333                enum_type: "VideoStreamEncoding",
33334                value: tmp as u32,
33335            })?;
33336        __struct.camera_device_id = buf.get_u8();
33337        Ok(__struct)
33338    }
33339    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33340        let mut __tmp = BytesMut::new(bytes);
33341        #[allow(clippy::absurd_extreme_comparisons)]
33342        #[allow(unused_comparisons)]
33343        if __tmp.remaining() < Self::ENCODED_LEN {
33344            panic!(
33345                "buffer is too small (need {} bytes, but got {})",
33346                Self::ENCODED_LEN,
33347                __tmp.remaining(),
33348            )
33349        }
33350        __tmp.put_f32_le(self.framerate);
33351        __tmp.put_u32_le(self.bitrate);
33352        __tmp.put_u16_le(self.flags.bits());
33353        __tmp.put_u16_le(self.resolution_h);
33354        __tmp.put_u16_le(self.resolution_v);
33355        __tmp.put_u16_le(self.rotation);
33356        __tmp.put_u16_le(self.hfov);
33357        __tmp.put_u8(self.stream_id);
33358        __tmp.put_u8(self.count);
33359        __tmp.put_u8(self.mavtype as u8);
33360        for val in &self.name {
33361            __tmp.put_u8(*val);
33362        }
33363        for val in &self.uri {
33364            __tmp.put_u8(*val);
33365        }
33366        __tmp.put_u8(self.encoding as u8);
33367        __tmp.put_u8(self.camera_device_id);
33368        if matches!(version, MavlinkVersion::V2) {
33369            let len = __tmp.len();
33370            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33371        } else {
33372            __tmp.len()
33373        }
33374    }
33375}
33376#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
33377#[doc = ""]
33378#[doc = "ID: 270"]
33379#[derive(Debug, Clone, PartialEq)]
33380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33382pub struct VIDEO_STREAM_STATUS_DATA {
33383    #[doc = "Frame rate"]
33384    pub framerate: f32,
33385    #[doc = "Bit rate"]
33386    pub bitrate: u32,
33387    #[doc = "Bitmap of stream status flags"]
33388    pub flags: VideoStreamStatusFlags,
33389    #[doc = "Horizontal resolution"]
33390    pub resolution_h: u16,
33391    #[doc = "Vertical resolution"]
33392    pub resolution_v: u16,
33393    #[doc = "Video image rotation clockwise"]
33394    pub rotation: u16,
33395    #[doc = "Horizontal Field of view"]
33396    pub hfov: u16,
33397    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
33398    pub stream_id: u8,
33399    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
33400    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33401    pub camera_device_id: u8,
33402}
33403impl VIDEO_STREAM_STATUS_DATA {
33404    pub const ENCODED_LEN: usize = 20usize;
33405    pub const DEFAULT: Self = Self {
33406        framerate: 0.0_f32,
33407        bitrate: 0_u32,
33408        flags: VideoStreamStatusFlags::DEFAULT,
33409        resolution_h: 0_u16,
33410        resolution_v: 0_u16,
33411        rotation: 0_u16,
33412        hfov: 0_u16,
33413        stream_id: 0_u8,
33414        camera_device_id: 0_u8,
33415    };
33416    #[cfg(feature = "arbitrary")]
33417    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33418        use arbitrary::{Arbitrary, Unstructured};
33419        let mut buf = [0u8; 1024];
33420        rng.fill_bytes(&mut buf);
33421        let mut unstructured = Unstructured::new(&buf);
33422        Self::arbitrary(&mut unstructured).unwrap_or_default()
33423    }
33424}
33425impl Default for VIDEO_STREAM_STATUS_DATA {
33426    fn default() -> Self {
33427        Self::DEFAULT.clone()
33428    }
33429}
33430impl MessageData for VIDEO_STREAM_STATUS_DATA {
33431    type Message = MavMessage;
33432    const ID: u32 = 270u32;
33433    const NAME: &'static str = "VIDEO_STREAM_STATUS";
33434    const EXTRA_CRC: u8 = 59u8;
33435    const ENCODED_LEN: usize = 20usize;
33436    fn deser(
33437        _version: MavlinkVersion,
33438        __input: &[u8],
33439    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33440        let avail_len = __input.len();
33441        let mut payload_buf = [0; Self::ENCODED_LEN];
33442        let mut buf = if avail_len < Self::ENCODED_LEN {
33443            payload_buf[0..avail_len].copy_from_slice(__input);
33444            Bytes::new(&payload_buf)
33445        } else {
33446            Bytes::new(__input)
33447        };
33448        let mut __struct = Self::default();
33449        __struct.framerate = buf.get_f32_le();
33450        __struct.bitrate = buf.get_u32_le();
33451        let tmp = buf.get_u16_le();
33452        __struct.flags = VideoStreamStatusFlags::from_bits(
33453            tmp & VideoStreamStatusFlags::all().bits(),
33454        )
33455        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33456            flag_type: "VideoStreamStatusFlags",
33457            value: tmp as u32,
33458        })?;
33459        __struct.resolution_h = buf.get_u16_le();
33460        __struct.resolution_v = buf.get_u16_le();
33461        __struct.rotation = buf.get_u16_le();
33462        __struct.hfov = buf.get_u16_le();
33463        __struct.stream_id = buf.get_u8();
33464        __struct.camera_device_id = buf.get_u8();
33465        Ok(__struct)
33466    }
33467    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33468        let mut __tmp = BytesMut::new(bytes);
33469        #[allow(clippy::absurd_extreme_comparisons)]
33470        #[allow(unused_comparisons)]
33471        if __tmp.remaining() < Self::ENCODED_LEN {
33472            panic!(
33473                "buffer is too small (need {} bytes, but got {})",
33474                Self::ENCODED_LEN,
33475                __tmp.remaining(),
33476            )
33477        }
33478        __tmp.put_f32_le(self.framerate);
33479        __tmp.put_u32_le(self.bitrate);
33480        __tmp.put_u16_le(self.flags.bits());
33481        __tmp.put_u16_le(self.resolution_h);
33482        __tmp.put_u16_le(self.resolution_v);
33483        __tmp.put_u16_le(self.rotation);
33484        __tmp.put_u16_le(self.hfov);
33485        __tmp.put_u8(self.stream_id);
33486        __tmp.put_u8(self.camera_device_id);
33487        if matches!(version, MavlinkVersion::V2) {
33488            let len = __tmp.len();
33489            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33490        } else {
33491            __tmp.len()
33492        }
33493    }
33494}
33495#[doc = "Local position/attitude estimate from a vision source."]
33496#[doc = ""]
33497#[doc = "ID: 102"]
33498#[derive(Debug, Clone, PartialEq)]
33499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33501pub struct VISION_POSITION_ESTIMATE_DATA {
33502    #[doc = "Timestamp (UNIX time or time since system boot)"]
33503    pub usec: u64,
33504    #[doc = "Local X position"]
33505    pub x: f32,
33506    #[doc = "Local Y position"]
33507    pub y: f32,
33508    #[doc = "Local Z position"]
33509    pub z: f32,
33510    #[doc = "Roll angle"]
33511    pub roll: f32,
33512    #[doc = "Pitch angle"]
33513    pub pitch: f32,
33514    #[doc = "Yaw angle"]
33515    pub yaw: f32,
33516    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
33517    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33518    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33519    pub covariance: [f32; 21],
33520    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33521    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33522    pub reset_counter: u8,
33523}
33524impl VISION_POSITION_ESTIMATE_DATA {
33525    pub const ENCODED_LEN: usize = 117usize;
33526    pub const DEFAULT: Self = Self {
33527        usec: 0_u64,
33528        x: 0.0_f32,
33529        y: 0.0_f32,
33530        z: 0.0_f32,
33531        roll: 0.0_f32,
33532        pitch: 0.0_f32,
33533        yaw: 0.0_f32,
33534        covariance: [0.0_f32; 21usize],
33535        reset_counter: 0_u8,
33536    };
33537    #[cfg(feature = "arbitrary")]
33538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33539        use arbitrary::{Arbitrary, Unstructured};
33540        let mut buf = [0u8; 1024];
33541        rng.fill_bytes(&mut buf);
33542        let mut unstructured = Unstructured::new(&buf);
33543        Self::arbitrary(&mut unstructured).unwrap_or_default()
33544    }
33545}
33546impl Default for VISION_POSITION_ESTIMATE_DATA {
33547    fn default() -> Self {
33548        Self::DEFAULT.clone()
33549    }
33550}
33551impl MessageData for VISION_POSITION_ESTIMATE_DATA {
33552    type Message = MavMessage;
33553    const ID: u32 = 102u32;
33554    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
33555    const EXTRA_CRC: u8 = 158u8;
33556    const ENCODED_LEN: usize = 117usize;
33557    fn deser(
33558        _version: MavlinkVersion,
33559        __input: &[u8],
33560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33561        let avail_len = __input.len();
33562        let mut payload_buf = [0; Self::ENCODED_LEN];
33563        let mut buf = if avail_len < Self::ENCODED_LEN {
33564            payload_buf[0..avail_len].copy_from_slice(__input);
33565            Bytes::new(&payload_buf)
33566        } else {
33567            Bytes::new(__input)
33568        };
33569        let mut __struct = Self::default();
33570        __struct.usec = buf.get_u64_le();
33571        __struct.x = buf.get_f32_le();
33572        __struct.y = buf.get_f32_le();
33573        __struct.z = buf.get_f32_le();
33574        __struct.roll = buf.get_f32_le();
33575        __struct.pitch = buf.get_f32_le();
33576        __struct.yaw = buf.get_f32_le();
33577        for v in &mut __struct.covariance {
33578            let val = buf.get_f32_le();
33579            *v = val;
33580        }
33581        __struct.reset_counter = buf.get_u8();
33582        Ok(__struct)
33583    }
33584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33585        let mut __tmp = BytesMut::new(bytes);
33586        #[allow(clippy::absurd_extreme_comparisons)]
33587        #[allow(unused_comparisons)]
33588        if __tmp.remaining() < Self::ENCODED_LEN {
33589            panic!(
33590                "buffer is too small (need {} bytes, but got {})",
33591                Self::ENCODED_LEN,
33592                __tmp.remaining(),
33593            )
33594        }
33595        __tmp.put_u64_le(self.usec);
33596        __tmp.put_f32_le(self.x);
33597        __tmp.put_f32_le(self.y);
33598        __tmp.put_f32_le(self.z);
33599        __tmp.put_f32_le(self.roll);
33600        __tmp.put_f32_le(self.pitch);
33601        __tmp.put_f32_le(self.yaw);
33602        for val in &self.covariance {
33603            __tmp.put_f32_le(*val);
33604        }
33605        __tmp.put_u8(self.reset_counter);
33606        if matches!(version, MavlinkVersion::V2) {
33607            let len = __tmp.len();
33608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33609        } else {
33610            __tmp.len()
33611        }
33612    }
33613}
33614#[doc = "Speed estimate from a vision source."]
33615#[doc = ""]
33616#[doc = "ID: 103"]
33617#[derive(Debug, Clone, PartialEq)]
33618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33619#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33620pub struct VISION_SPEED_ESTIMATE_DATA {
33621    #[doc = "Timestamp (UNIX time or time since system boot)"]
33622    pub usec: u64,
33623    #[doc = "Global X speed"]
33624    pub x: f32,
33625    #[doc = "Global Y speed"]
33626    pub y: f32,
33627    #[doc = "Global Z speed"]
33628    pub z: f32,
33629    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
33630    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33631    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33632    pub covariance: [f32; 9],
33633    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
33634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
33635    pub reset_counter: u8,
33636}
33637impl VISION_SPEED_ESTIMATE_DATA {
33638    pub const ENCODED_LEN: usize = 57usize;
33639    pub const DEFAULT: Self = Self {
33640        usec: 0_u64,
33641        x: 0.0_f32,
33642        y: 0.0_f32,
33643        z: 0.0_f32,
33644        covariance: [0.0_f32; 9usize],
33645        reset_counter: 0_u8,
33646    };
33647    #[cfg(feature = "arbitrary")]
33648    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33649        use arbitrary::{Arbitrary, Unstructured};
33650        let mut buf = [0u8; 1024];
33651        rng.fill_bytes(&mut buf);
33652        let mut unstructured = Unstructured::new(&buf);
33653        Self::arbitrary(&mut unstructured).unwrap_or_default()
33654    }
33655}
33656impl Default for VISION_SPEED_ESTIMATE_DATA {
33657    fn default() -> Self {
33658        Self::DEFAULT.clone()
33659    }
33660}
33661impl MessageData for VISION_SPEED_ESTIMATE_DATA {
33662    type Message = MavMessage;
33663    const ID: u32 = 103u32;
33664    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
33665    const EXTRA_CRC: u8 = 208u8;
33666    const ENCODED_LEN: usize = 57usize;
33667    fn deser(
33668        _version: MavlinkVersion,
33669        __input: &[u8],
33670    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33671        let avail_len = __input.len();
33672        let mut payload_buf = [0; Self::ENCODED_LEN];
33673        let mut buf = if avail_len < Self::ENCODED_LEN {
33674            payload_buf[0..avail_len].copy_from_slice(__input);
33675            Bytes::new(&payload_buf)
33676        } else {
33677            Bytes::new(__input)
33678        };
33679        let mut __struct = Self::default();
33680        __struct.usec = buf.get_u64_le();
33681        __struct.x = buf.get_f32_le();
33682        __struct.y = buf.get_f32_le();
33683        __struct.z = buf.get_f32_le();
33684        for v in &mut __struct.covariance {
33685            let val = buf.get_f32_le();
33686            *v = val;
33687        }
33688        __struct.reset_counter = buf.get_u8();
33689        Ok(__struct)
33690    }
33691    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33692        let mut __tmp = BytesMut::new(bytes);
33693        #[allow(clippy::absurd_extreme_comparisons)]
33694        #[allow(unused_comparisons)]
33695        if __tmp.remaining() < Self::ENCODED_LEN {
33696            panic!(
33697                "buffer is too small (need {} bytes, but got {})",
33698                Self::ENCODED_LEN,
33699                __tmp.remaining(),
33700            )
33701        }
33702        __tmp.put_u64_le(self.usec);
33703        __tmp.put_f32_le(self.x);
33704        __tmp.put_f32_le(self.y);
33705        __tmp.put_f32_le(self.z);
33706        for val in &self.covariance {
33707            __tmp.put_f32_le(*val);
33708        }
33709        __tmp.put_u8(self.reset_counter);
33710        if matches!(version, MavlinkVersion::V2) {
33711            let len = __tmp.len();
33712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33713        } else {
33714            __tmp.len()
33715        }
33716    }
33717}
33718#[doc = "Cumulative distance traveled for each reported wheel."]
33719#[doc = ""]
33720#[doc = "ID: 9000"]
33721#[derive(Debug, Clone, PartialEq)]
33722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33724pub struct WHEEL_DISTANCE_DATA {
33725    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33726    pub time_usec: u64,
33727    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
33728    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33729    pub distance: [f64; 16],
33730    #[doc = "Number of wheels reported."]
33731    pub count: u8,
33732}
33733impl WHEEL_DISTANCE_DATA {
33734    pub const ENCODED_LEN: usize = 137usize;
33735    pub const DEFAULT: Self = Self {
33736        time_usec: 0_u64,
33737        distance: [0.0_f64; 16usize],
33738        count: 0_u8,
33739    };
33740    #[cfg(feature = "arbitrary")]
33741    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33742        use arbitrary::{Arbitrary, Unstructured};
33743        let mut buf = [0u8; 1024];
33744        rng.fill_bytes(&mut buf);
33745        let mut unstructured = Unstructured::new(&buf);
33746        Self::arbitrary(&mut unstructured).unwrap_or_default()
33747    }
33748}
33749impl Default for WHEEL_DISTANCE_DATA {
33750    fn default() -> Self {
33751        Self::DEFAULT.clone()
33752    }
33753}
33754impl MessageData for WHEEL_DISTANCE_DATA {
33755    type Message = MavMessage;
33756    const ID: u32 = 9000u32;
33757    const NAME: &'static str = "WHEEL_DISTANCE";
33758    const EXTRA_CRC: u8 = 113u8;
33759    const ENCODED_LEN: usize = 137usize;
33760    fn deser(
33761        _version: MavlinkVersion,
33762        __input: &[u8],
33763    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33764        let avail_len = __input.len();
33765        let mut payload_buf = [0; Self::ENCODED_LEN];
33766        let mut buf = if avail_len < Self::ENCODED_LEN {
33767            payload_buf[0..avail_len].copy_from_slice(__input);
33768            Bytes::new(&payload_buf)
33769        } else {
33770            Bytes::new(__input)
33771        };
33772        let mut __struct = Self::default();
33773        __struct.time_usec = buf.get_u64_le();
33774        for v in &mut __struct.distance {
33775            let val = buf.get_f64_le();
33776            *v = val;
33777        }
33778        __struct.count = buf.get_u8();
33779        Ok(__struct)
33780    }
33781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33782        let mut __tmp = BytesMut::new(bytes);
33783        #[allow(clippy::absurd_extreme_comparisons)]
33784        #[allow(unused_comparisons)]
33785        if __tmp.remaining() < Self::ENCODED_LEN {
33786            panic!(
33787                "buffer is too small (need {} bytes, but got {})",
33788                Self::ENCODED_LEN,
33789                __tmp.remaining(),
33790            )
33791        }
33792        __tmp.put_u64_le(self.time_usec);
33793        for val in &self.distance {
33794            __tmp.put_f64_le(*val);
33795        }
33796        __tmp.put_u8(self.count);
33797        if matches!(version, MavlinkVersion::V2) {
33798            let len = __tmp.len();
33799            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33800        } else {
33801            __tmp.len()
33802        }
33803    }
33804}
33805#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
33806#[doc = ""]
33807#[doc = "ID: 299"]
33808#[derive(Debug, Clone, PartialEq)]
33809#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33810#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33811pub struct WIFI_CONFIG_AP_DATA {
33812    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
33813    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33814    pub ssid: [u8; 32],
33815    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
33816    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
33817    pub password: [u8; 64],
33818    #[doc = "WiFi Mode."]
33819    #[cfg_attr(feature = "serde", serde(default))]
33820    pub mode: WifiConfigApMode,
33821    #[doc = "Message acceptance response (sent back to GS)."]
33822    #[cfg_attr(feature = "serde", serde(default))]
33823    pub response: WifiConfigApResponse,
33824}
33825impl WIFI_CONFIG_AP_DATA {
33826    pub const ENCODED_LEN: usize = 98usize;
33827    pub const DEFAULT: Self = Self {
33828        ssid: [0_u8; 32usize],
33829        password: [0_u8; 64usize],
33830        mode: WifiConfigApMode::DEFAULT,
33831        response: WifiConfigApResponse::DEFAULT,
33832    };
33833    #[cfg(feature = "arbitrary")]
33834    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33835        use arbitrary::{Arbitrary, Unstructured};
33836        let mut buf = [0u8; 1024];
33837        rng.fill_bytes(&mut buf);
33838        let mut unstructured = Unstructured::new(&buf);
33839        Self::arbitrary(&mut unstructured).unwrap_or_default()
33840    }
33841}
33842impl Default for WIFI_CONFIG_AP_DATA {
33843    fn default() -> Self {
33844        Self::DEFAULT.clone()
33845    }
33846}
33847impl MessageData for WIFI_CONFIG_AP_DATA {
33848    type Message = MavMessage;
33849    const ID: u32 = 299u32;
33850    const NAME: &'static str = "WIFI_CONFIG_AP";
33851    const EXTRA_CRC: u8 = 19u8;
33852    const ENCODED_LEN: usize = 98usize;
33853    fn deser(
33854        _version: MavlinkVersion,
33855        __input: &[u8],
33856    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33857        let avail_len = __input.len();
33858        let mut payload_buf = [0; Self::ENCODED_LEN];
33859        let mut buf = if avail_len < Self::ENCODED_LEN {
33860            payload_buf[0..avail_len].copy_from_slice(__input);
33861            Bytes::new(&payload_buf)
33862        } else {
33863            Bytes::new(__input)
33864        };
33865        let mut __struct = Self::default();
33866        for v in &mut __struct.ssid {
33867            let val = buf.get_u8();
33868            *v = val;
33869        }
33870        for v in &mut __struct.password {
33871            let val = buf.get_u8();
33872            *v = val;
33873        }
33874        let tmp = buf.get_i8();
33875        __struct.mode =
33876            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33877                enum_type: "WifiConfigApMode",
33878                value: tmp as u32,
33879            })?;
33880        let tmp = buf.get_i8();
33881        __struct.response =
33882            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
33883                enum_type: "WifiConfigApResponse",
33884                value: tmp as u32,
33885            })?;
33886        Ok(__struct)
33887    }
33888    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
33889        let mut __tmp = BytesMut::new(bytes);
33890        #[allow(clippy::absurd_extreme_comparisons)]
33891        #[allow(unused_comparisons)]
33892        if __tmp.remaining() < Self::ENCODED_LEN {
33893            panic!(
33894                "buffer is too small (need {} bytes, but got {})",
33895                Self::ENCODED_LEN,
33896                __tmp.remaining(),
33897            )
33898        }
33899        for val in &self.ssid {
33900            __tmp.put_u8(*val);
33901        }
33902        for val in &self.password {
33903            __tmp.put_u8(*val);
33904        }
33905        __tmp.put_i8(self.mode as i8);
33906        __tmp.put_i8(self.response as i8);
33907        if matches!(version, MavlinkVersion::V2) {
33908            let len = __tmp.len();
33909            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
33910        } else {
33911            __tmp.len()
33912        }
33913    }
33914}
33915#[doc = "Winch status."]
33916#[doc = ""]
33917#[doc = "ID: 9005"]
33918#[derive(Debug, Clone, PartialEq)]
33919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
33920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
33921pub struct WINCH_STATUS_DATA {
33922    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
33923    pub time_usec: u64,
33924    #[doc = "Length of line released. NaN if unknown"]
33925    pub line_length: f32,
33926    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
33927    pub speed: f32,
33928    #[doc = "Tension on the line. NaN if unknown"]
33929    pub tension: f32,
33930    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
33931    pub voltage: f32,
33932    #[doc = "Current draw from the winch. NaN if unknown"]
33933    pub current: f32,
33934    #[doc = "Status flags"]
33935    pub status: MavWinchStatusFlag,
33936    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
33937    pub temperature: i16,
33938}
33939impl WINCH_STATUS_DATA {
33940    pub const ENCODED_LEN: usize = 34usize;
33941    pub const DEFAULT: Self = Self {
33942        time_usec: 0_u64,
33943        line_length: 0.0_f32,
33944        speed: 0.0_f32,
33945        tension: 0.0_f32,
33946        voltage: 0.0_f32,
33947        current: 0.0_f32,
33948        status: MavWinchStatusFlag::DEFAULT,
33949        temperature: 0_i16,
33950    };
33951    #[cfg(feature = "arbitrary")]
33952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
33953        use arbitrary::{Arbitrary, Unstructured};
33954        let mut buf = [0u8; 1024];
33955        rng.fill_bytes(&mut buf);
33956        let mut unstructured = Unstructured::new(&buf);
33957        Self::arbitrary(&mut unstructured).unwrap_or_default()
33958    }
33959}
33960impl Default for WINCH_STATUS_DATA {
33961    fn default() -> Self {
33962        Self::DEFAULT.clone()
33963    }
33964}
33965impl MessageData for WINCH_STATUS_DATA {
33966    type Message = MavMessage;
33967    const ID: u32 = 9005u32;
33968    const NAME: &'static str = "WINCH_STATUS";
33969    const EXTRA_CRC: u8 = 117u8;
33970    const ENCODED_LEN: usize = 34usize;
33971    fn deser(
33972        _version: MavlinkVersion,
33973        __input: &[u8],
33974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
33975        let avail_len = __input.len();
33976        let mut payload_buf = [0; Self::ENCODED_LEN];
33977        let mut buf = if avail_len < Self::ENCODED_LEN {
33978            payload_buf[0..avail_len].copy_from_slice(__input);
33979            Bytes::new(&payload_buf)
33980        } else {
33981            Bytes::new(__input)
33982        };
33983        let mut __struct = Self::default();
33984        __struct.time_usec = buf.get_u64_le();
33985        __struct.line_length = buf.get_f32_le();
33986        __struct.speed = buf.get_f32_le();
33987        __struct.tension = buf.get_f32_le();
33988        __struct.voltage = buf.get_f32_le();
33989        __struct.current = buf.get_f32_le();
33990        let tmp = buf.get_u32_le();
33991        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
33992            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
33993                flag_type: "MavWinchStatusFlag",
33994                value: tmp as u32,
33995            })?;
33996        __struct.temperature = buf.get_i16_le();
33997        Ok(__struct)
33998    }
33999    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34000        let mut __tmp = BytesMut::new(bytes);
34001        #[allow(clippy::absurd_extreme_comparisons)]
34002        #[allow(unused_comparisons)]
34003        if __tmp.remaining() < Self::ENCODED_LEN {
34004            panic!(
34005                "buffer is too small (need {} bytes, but got {})",
34006                Self::ENCODED_LEN,
34007                __tmp.remaining(),
34008            )
34009        }
34010        __tmp.put_u64_le(self.time_usec);
34011        __tmp.put_f32_le(self.line_length);
34012        __tmp.put_f32_le(self.speed);
34013        __tmp.put_f32_le(self.tension);
34014        __tmp.put_f32_le(self.voltage);
34015        __tmp.put_f32_le(self.current);
34016        __tmp.put_u32_le(self.status.bits());
34017        __tmp.put_i16_le(self.temperature);
34018        if matches!(version, MavlinkVersion::V2) {
34019            let len = __tmp.len();
34020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34021        } else {
34022            __tmp.len()
34023        }
34024    }
34025}
34026#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
34027#[doc = ""]
34028#[doc = "ID: 231"]
34029#[derive(Debug, Clone, PartialEq)]
34030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34032pub struct WIND_COV_DATA {
34033    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
34034    pub time_usec: u64,
34035    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
34036    pub wind_x: f32,
34037    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
34038    pub wind_y: f32,
34039    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
34040    pub wind_z: f32,
34041    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34042    pub var_horiz: f32,
34043    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
34044    pub var_vert: f32,
34045    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
34046    pub wind_alt: f32,
34047    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
34048    pub horiz_accuracy: f32,
34049    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
34050    pub vert_accuracy: f32,
34051}
34052impl WIND_COV_DATA {
34053    pub const ENCODED_LEN: usize = 40usize;
34054    pub const DEFAULT: Self = Self {
34055        time_usec: 0_u64,
34056        wind_x: 0.0_f32,
34057        wind_y: 0.0_f32,
34058        wind_z: 0.0_f32,
34059        var_horiz: 0.0_f32,
34060        var_vert: 0.0_f32,
34061        wind_alt: 0.0_f32,
34062        horiz_accuracy: 0.0_f32,
34063        vert_accuracy: 0.0_f32,
34064    };
34065    #[cfg(feature = "arbitrary")]
34066    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
34067        use arbitrary::{Arbitrary, Unstructured};
34068        let mut buf = [0u8; 1024];
34069        rng.fill_bytes(&mut buf);
34070        let mut unstructured = Unstructured::new(&buf);
34071        Self::arbitrary(&mut unstructured).unwrap_or_default()
34072    }
34073}
34074impl Default for WIND_COV_DATA {
34075    fn default() -> Self {
34076        Self::DEFAULT.clone()
34077    }
34078}
34079impl MessageData for WIND_COV_DATA {
34080    type Message = MavMessage;
34081    const ID: u32 = 231u32;
34082    const NAME: &'static str = "WIND_COV";
34083    const EXTRA_CRC: u8 = 105u8;
34084    const ENCODED_LEN: usize = 40usize;
34085    fn deser(
34086        _version: MavlinkVersion,
34087        __input: &[u8],
34088    ) -> Result<Self, ::mavlink_core::error::ParserError> {
34089        let avail_len = __input.len();
34090        let mut payload_buf = [0; Self::ENCODED_LEN];
34091        let mut buf = if avail_len < Self::ENCODED_LEN {
34092            payload_buf[0..avail_len].copy_from_slice(__input);
34093            Bytes::new(&payload_buf)
34094        } else {
34095            Bytes::new(__input)
34096        };
34097        let mut __struct = Self::default();
34098        __struct.time_usec = buf.get_u64_le();
34099        __struct.wind_x = buf.get_f32_le();
34100        __struct.wind_y = buf.get_f32_le();
34101        __struct.wind_z = buf.get_f32_le();
34102        __struct.var_horiz = buf.get_f32_le();
34103        __struct.var_vert = buf.get_f32_le();
34104        __struct.wind_alt = buf.get_f32_le();
34105        __struct.horiz_accuracy = buf.get_f32_le();
34106        __struct.vert_accuracy = buf.get_f32_le();
34107        Ok(__struct)
34108    }
34109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34110        let mut __tmp = BytesMut::new(bytes);
34111        #[allow(clippy::absurd_extreme_comparisons)]
34112        #[allow(unused_comparisons)]
34113        if __tmp.remaining() < Self::ENCODED_LEN {
34114            panic!(
34115                "buffer is too small (need {} bytes, but got {})",
34116                Self::ENCODED_LEN,
34117                __tmp.remaining(),
34118            )
34119        }
34120        __tmp.put_u64_le(self.time_usec);
34121        __tmp.put_f32_le(self.wind_x);
34122        __tmp.put_f32_le(self.wind_y);
34123        __tmp.put_f32_le(self.wind_z);
34124        __tmp.put_f32_le(self.var_horiz);
34125        __tmp.put_f32_le(self.var_vert);
34126        __tmp.put_f32_le(self.wind_alt);
34127        __tmp.put_f32_le(self.horiz_accuracy);
34128        __tmp.put_f32_le(self.vert_accuracy);
34129        if matches!(version, MavlinkVersion::V2) {
34130            let len = __tmp.len();
34131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
34132        } else {
34133            __tmp.len()
34134        }
34135    }
34136}
34137#[derive(Clone, PartialEq, Debug)]
34138#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
34139#[cfg_attr(feature = "serde", serde(tag = "type"))]
34140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
34141#[repr(u32)]
34142pub enum MavMessage {
34143    #[doc = "Set the vehicle attitude and body angular rates."]
34144    #[doc = ""]
34145    #[doc = "ID: 140"]
34146    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
34147    #[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
34148    #[doc = ""]
34149    #[doc = "ID: 375"]
34150    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
34151    #[doc = "The location and information of an ADSB vehicle."]
34152    #[doc = ""]
34153    #[doc = "ID: 246"]
34154    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
34155    #[doc = "The airspeed measured by sensors and IMU."]
34156    #[doc = ""]
34157    #[doc = "ID: 182"]
34158    AIRSPEEDS(AIRSPEEDS_DATA),
34159    #[doc = "The location and information of an AIS vessel."]
34160    #[doc = ""]
34161    #[doc = "ID: 301"]
34162    AIS_VESSEL(AIS_VESSEL_DATA),
34163    #[doc = "The current system altitude."]
34164    #[doc = ""]
34165    #[doc = "ID: 141"]
34166    ALTITUDE(ALTITUDE_DATA),
34167    #[doc = "The altitude measured by sensors and IMU."]
34168    #[doc = ""]
34169    #[doc = "ID: 181"]
34170    ALTITUDES(ALTITUDES_DATA),
34171    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
34172    #[doc = ""]
34173    #[doc = "ID: 30"]
34174    ATTITUDE(ATTITUDE_DATA),
34175    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34176    #[doc = ""]
34177    #[doc = "ID: 31"]
34178    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
34179    #[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
34180    #[doc = ""]
34181    #[doc = "ID: 61"]
34182    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
34183    #[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
34184    #[doc = ""]
34185    #[doc = "ID: 83"]
34186    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
34187    #[doc = "Motion capture attitude and position."]
34188    #[doc = ""]
34189    #[doc = "ID: 138"]
34190    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
34191    #[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
34192    #[doc = ""]
34193    #[doc = "ID: 7"]
34194    AUTH_KEY(AUTH_KEY_DATA),
34195    #[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
34196    #[doc = ""]
34197    #[doc = "ID: 286"]
34198    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
34199    #[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
34200    #[doc = ""]
34201    #[doc = "ID: 148"]
34202    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
34203    #[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
34204    #[doc = ""]
34205    #[doc = "ID: 435"]
34206    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
34207    #[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
34208    #[doc = ""]
34209    #[doc = "ID: 437"]
34210    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
34211    #[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
34212    #[doc = ""]
34213    #[doc = "ID: 372"]
34214    BATTERY_INFO(BATTERY_INFO_DATA),
34215    #[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
34216    #[doc = ""]
34217    #[doc = "ID: 147"]
34218    BATTERY_STATUS(BATTERY_STATUS_DATA),
34219    #[doc = "Report button state change."]
34220    #[doc = ""]
34221    #[doc = "ID: 257"]
34222    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
34223    #[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34224    #[doc = ""]
34225    #[doc = "ID: 262"]
34226    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
34227    #[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34228    #[doc = ""]
34229    #[doc = "ID: 271"]
34230    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
34231    #[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
34232    #[doc = ""]
34233    #[doc = "ID: 263"]
34234    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
34235    #[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34236    #[doc = ""]
34237    #[doc = "ID: 259"]
34238    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
34239    #[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
34240    #[doc = ""]
34241    #[doc = "ID: 260"]
34242    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
34243    #[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
34244    #[doc = ""]
34245    #[doc = "ID: 277"]
34246    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
34247    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34248    #[doc = ""]
34249    #[doc = "ID: 276"]
34250    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
34251    #[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
34252    #[doc = ""]
34253    #[doc = "ID: 275"]
34254    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
34255    #[doc = "Camera-IMU triggering and synchronisation message."]
34256    #[doc = ""]
34257    #[doc = "ID: 112"]
34258    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
34259    #[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
34260    #[doc = ""]
34261    #[doc = "ID: 387"]
34262    CANFD_FRAME(CANFD_FRAME_DATA),
34263    #[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
34264    #[doc = ""]
34265    #[doc = "ID: 388"]
34266    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
34267    #[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
34268    #[doc = ""]
34269    #[doc = "ID: 386"]
34270    CAN_FRAME(CAN_FRAME_DATA),
34271    #[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
34272    #[doc = ""]
34273    #[doc = "ID: 336"]
34274    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
34275    #[doc = "Report current used cellular network status."]
34276    #[doc = ""]
34277    #[doc = "ID: 334"]
34278    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
34279    #[doc = "Request to control this MAV."]
34280    #[doc = ""]
34281    #[doc = "ID: 5"]
34282    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
34283    #[doc = "Accept / deny control of this MAV."]
34284    #[doc = ""]
34285    #[doc = "ID: 6"]
34286    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
34287    #[doc = "Information about a potential collision."]
34288    #[doc = ""]
34289    #[doc = "ID: 247"]
34290    COLLISION(COLLISION_DATA),
34291    #[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34292    #[doc = ""]
34293    #[doc = "ID: 77"]
34294    COMMAND_ACK(COMMAND_ACK_DATA),
34295    #[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34296    #[doc = ""]
34297    #[doc = "ID: 80"]
34298    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
34299    #[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34300    #[doc = ""]
34301    #[doc = "ID: 75"]
34302    COMMAND_INT(COMMAND_INT_DATA),
34303    #[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
34304    #[doc = ""]
34305    #[doc = "ID: 76"]
34306    COMMAND_LONG(COMMAND_LONG_DATA),
34307    #[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
34308    #[doc = ""]
34309    #[doc = "ID: 395"]
34310    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
34311    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
34312    #[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
34313    #[doc = ""]
34314    #[doc = "ID: 396"]
34315    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
34316    #[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
34317    #[doc = ""]
34318    #[doc = "ID: 397"]
34319    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
34320    #[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
34321    #[doc = ""]
34322    #[doc = "ID: 146"]
34323    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
34324    #[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
34325    #[doc = ""]
34326    #[doc = "ID: 411"]
34327    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
34328    #[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
34329    #[doc = ""]
34330    #[doc = "ID: 436"]
34331    CURRENT_MODE(CURRENT_MODE_DATA),
34332    #[doc = "Data stream status information."]
34333    #[doc = ""]
34334    #[doc = "ID: 67"]
34335    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
34336    DATA_STREAM(DATA_STREAM_DATA),
34337    #[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34338    #[doc = ""]
34339    #[doc = "ID: 130"]
34340    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
34341    #[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
34342    #[doc = ""]
34343    #[doc = "ID: 254"]
34344    DEBUG(DEBUG_DATA),
34345    #[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
34346    #[doc = ""]
34347    #[doc = "ID: 350"]
34348    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
34349    #[doc = "To debug something using a named 3D vector."]
34350    #[doc = ""]
34351    #[doc = "ID: 250"]
34352    DEBUG_VECT(DEBUG_VECT_DATA),
34353    #[doc = "Distance sensor information for an onboard rangefinder."]
34354    #[doc = ""]
34355    #[doc = "ID: 132"]
34356    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
34357    #[doc = "EFI status output."]
34358    #[doc = ""]
34359    #[doc = "ID: 225"]
34360    EFI_STATUS(EFI_STATUS_DATA),
34361    #[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
34362    #[doc = ""]
34363    #[doc = "ID: 131"]
34364    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
34365    #[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
34366    #[doc = ""]
34367    #[doc = "ID: 290"]
34368    ESC_INFO(ESC_INFO_DATA),
34369    #[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
34370    #[doc = ""]
34371    #[doc = "ID: 291"]
34372    ESC_STATUS(ESC_STATUS_DATA),
34373    #[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
34374    #[doc = ""]
34375    #[doc = "ID: 230"]
34376    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
34377    #[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
34378    #[doc = ""]
34379    #[doc = "ID: 410"]
34380    EVENT(EVENT_DATA),
34381    #[doc = "Provides state for additional features."]
34382    #[doc = ""]
34383    #[doc = "ID: 245"]
34384    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
34385    #[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
34386    #[doc = ""]
34387    #[doc = "ID: 162"]
34388    FENCE_STATUS(FENCE_STATUS_DATA),
34389    #[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
34390    #[doc = ""]
34391    #[doc = "ID: 110"]
34392    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
34393    #[doc = "Flexifunction type and parameters for component at function index from buffer."]
34394    #[doc = ""]
34395    #[doc = "ID: 152"]
34396    FLEXIFUNCTION_BUFFER_FUNCTION(FLEXIFUNCTION_BUFFER_FUNCTION_DATA),
34397    #[doc = "Flexifunction type and parameters for component at function index from buffer."]
34398    #[doc = ""]
34399    #[doc = "ID: 153"]
34400    FLEXIFUNCTION_BUFFER_FUNCTION_ACK(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA),
34401    #[doc = "Acknowldge success or failure of a flexifunction command."]
34402    #[doc = ""]
34403    #[doc = "ID: 157"]
34404    FLEXIFUNCTION_COMMAND(FLEXIFUNCTION_COMMAND_DATA),
34405    #[doc = "Acknowldge success or failure of a flexifunction command."]
34406    #[doc = ""]
34407    #[doc = "ID: 158"]
34408    FLEXIFUNCTION_COMMAND_ACK(FLEXIFUNCTION_COMMAND_ACK_DATA),
34409    #[doc = "Acknowldge success or failure of a flexifunction command."]
34410    #[doc = ""]
34411    #[doc = "ID: 155"]
34412    FLEXIFUNCTION_DIRECTORY(FLEXIFUNCTION_DIRECTORY_DATA),
34413    #[doc = "Acknowldge success or failure of a flexifunction command."]
34414    #[doc = ""]
34415    #[doc = "ID: 156"]
34416    FLEXIFUNCTION_DIRECTORY_ACK(FLEXIFUNCTION_DIRECTORY_ACK_DATA),
34417    #[doc = "Request reading of flexifunction data."]
34418    #[doc = ""]
34419    #[doc = "ID: 151"]
34420    FLEXIFUNCTION_READ_REQ(FLEXIFUNCTION_READ_REQ_DATA),
34421    #[doc = "Depreciated but used as a compiler flag.  Do not remove."]
34422    #[doc = ""]
34423    #[doc = "ID: 150"]
34424    FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA),
34425    #[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
34426    #[doc = ""]
34427    #[doc = "ID: 264"]
34428    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
34429    #[doc = "Current motion information from a designated system."]
34430    #[doc = ""]
34431    #[doc = "ID: 144"]
34432    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
34433    #[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
34434    #[doc = ""]
34435    #[doc = "ID: 371"]
34436    FUEL_STATUS(FUEL_STATUS_DATA),
34437    #[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
34438    #[doc = ""]
34439    #[doc = "ID: 373"]
34440    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
34441    #[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
34442    #[doc = ""]
34443    #[doc = "ID: 285"]
34444    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
34445    #[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
34446    #[doc = ""]
34447    #[doc = "ID: 283"]
34448    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
34449    #[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
34450    #[doc = ""]
34451    #[doc = "ID: 284"]
34452    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
34453    #[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
34454    #[doc = ""]
34455    #[doc = "ID: 280"]
34456    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
34457    #[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34458    #[doc = ""]
34459    #[doc = "ID: 282"]
34460    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
34461    #[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
34462    #[doc = ""]
34463    #[doc = "ID: 288"]
34464    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
34465    #[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
34466    #[doc = ""]
34467    #[doc = "ID: 287"]
34468    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
34469    #[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
34470    #[doc = ""]
34471    #[doc = "ID: 281"]
34472    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
34473    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
34474    #[doc = ""]
34475    #[doc = "ID: 33"]
34476    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
34477    #[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
34478    #[doc = ""]
34479    #[doc = "ID: 63"]
34480    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
34481    #[doc = "Global position/attitude estimate from a vision source."]
34482    #[doc = ""]
34483    #[doc = "ID: 101"]
34484    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
34485    #[doc = "Second GPS data."]
34486    #[doc = ""]
34487    #[doc = "ID: 124"]
34488    GPS2_RAW(GPS2_RAW_DATA),
34489    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34490    #[doc = ""]
34491    #[doc = "ID: 128"]
34492    GPS2_RTK(GPS2_RTK_DATA),
34493    #[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
34494    #[doc = ""]
34495    #[doc = "ID: 49"]
34496    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
34497    #[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
34498    #[doc = ""]
34499    #[doc = "ID: 123"]
34500    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
34501    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
34502    #[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
34503    #[doc = ""]
34504    #[doc = "ID: 232"]
34505    GPS_INPUT(GPS_INPUT_DATA),
34506    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34507    #[doc = ""]
34508    #[doc = "ID: 24"]
34509    GPS_RAW_INT(GPS_RAW_INT_DATA),
34510    #[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
34511    #[doc = ""]
34512    #[doc = "ID: 233"]
34513    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
34514    #[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
34515    #[doc = ""]
34516    #[doc = "ID: 127"]
34517    GPS_RTK(GPS_RTK_DATA),
34518    #[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
34519    #[doc = ""]
34520    #[doc = "ID: 25"]
34521    GPS_STATUS(GPS_STATUS_DATA),
34522    #[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
34523    #[doc = ""]
34524    #[doc = "ID: 0"]
34525    HEARTBEAT(HEARTBEAT_DATA),
34526    #[doc = "The IMU readings in SI units in NED body frame."]
34527    #[doc = ""]
34528    #[doc = "ID: 105"]
34529    HIGHRES_IMU(HIGHRES_IMU_DATA),
34530    #[doc = "Message appropriate for high latency connections like Iridium."]
34531    #[doc = ""]
34532    #[doc = "ID: 234"]
34533    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
34534    HIGH_LATENCY(HIGH_LATENCY_DATA),
34535    #[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
34536    #[doc = ""]
34537    #[doc = "ID: 235"]
34538    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
34539    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
34540    #[doc = ""]
34541    #[doc = "ID: 93"]
34542    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
34543    #[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
34544    #[doc = ""]
34545    #[doc = "ID: 91"]
34546    HIL_CONTROLS(HIL_CONTROLS_DATA),
34547    #[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
34548    #[doc = ""]
34549    #[doc = "ID: 113"]
34550    HIL_GPS(HIL_GPS_DATA),
34551    #[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
34552    #[doc = ""]
34553    #[doc = "ID: 114"]
34554    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
34555    #[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
34556    #[doc = ""]
34557    #[doc = "ID: 92"]
34558    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
34559    #[doc = "The IMU readings in SI units in NED body frame."]
34560    #[doc = ""]
34561    #[doc = "ID: 107"]
34562    HIL_SENSOR(HIL_SENSOR_DATA),
34563    #[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34564    #[doc = ""]
34565    #[doc = "ID: 90"]
34566    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
34567    HIL_STATE(HIL_STATE_DATA),
34568    #[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
34569    #[doc = ""]
34570    #[doc = "ID: 115"]
34571    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
34572    #[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
34573    #[doc = ""]
34574    #[doc = "ID: 242"]
34575    HOME_POSITION(HOME_POSITION_DATA),
34576    #[doc = "Temperature and humidity from hygrometer."]
34577    #[doc = ""]
34578    #[doc = "ID: 12920"]
34579    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
34580    #[doc = "Illuminator status."]
34581    #[doc = ""]
34582    #[doc = "ID: 440"]
34583    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
34584    #[doc = "Status of the Iridium SBD link."]
34585    #[doc = ""]
34586    #[doc = "ID: 335"]
34587    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
34588    #[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
34589    #[doc = ""]
34590    #[doc = "ID: 149"]
34591    LANDING_TARGET(LANDING_TARGET_DATA),
34592    #[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
34593    #[doc = ""]
34594    #[doc = "ID: 8"]
34595    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
34596    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34597    #[doc = ""]
34598    #[doc = "ID: 32"]
34599    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
34600    #[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34601    #[doc = ""]
34602    #[doc = "ID: 64"]
34603    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
34604    #[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
34605    #[doc = ""]
34606    #[doc = "ID: 89"]
34607    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
34608    #[doc = "An ack for a LOGGING_DATA_ACKED message."]
34609    #[doc = ""]
34610    #[doc = "ID: 268"]
34611    LOGGING_ACK(LOGGING_ACK_DATA),
34612    #[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
34613    #[doc = ""]
34614    #[doc = "ID: 266"]
34615    LOGGING_DATA(LOGGING_DATA_DATA),
34616    #[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
34617    #[doc = ""]
34618    #[doc = "ID: 267"]
34619    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
34620    #[doc = "Reply to LOG_REQUEST_DATA."]
34621    #[doc = ""]
34622    #[doc = "ID: 120"]
34623    LOG_DATA(LOG_DATA_DATA),
34624    #[doc = "Reply to LOG_REQUEST_LIST."]
34625    #[doc = ""]
34626    #[doc = "ID: 118"]
34627    LOG_ENTRY(LOG_ENTRY_DATA),
34628    #[doc = "Erase all logs."]
34629    #[doc = ""]
34630    #[doc = "ID: 121"]
34631    LOG_ERASE(LOG_ERASE_DATA),
34632    #[doc = "Request a chunk of a log."]
34633    #[doc = ""]
34634    #[doc = "ID: 119"]
34635    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
34636    #[doc = "Stop log transfer and resume normal logging."]
34637    #[doc = ""]
34638    #[doc = "ID: 122"]
34639    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
34640    #[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
34641    #[doc = ""]
34642    #[doc = "ID: 117"]
34643    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
34644    #[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
34645    #[doc = ""]
34646    #[doc = "ID: 192"]
34647    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
34648    #[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
34649    #[doc = ""]
34650    #[doc = "ID: 69"]
34651    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
34652    #[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
34653    #[doc = ""]
34654    #[doc = "ID: 81"]
34655    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
34656    #[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34657    #[doc = ""]
34658    #[doc = "ID: 249"]
34659    MEMORY_VECT(MEMORY_VECT_DATA),
34660    #[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
34661    #[doc = ""]
34662    #[doc = "ID: 244"]
34663    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
34664    #[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
34665    #[doc = ""]
34666    #[doc = "ID: 47"]
34667    MISSION_ACK(MISSION_ACK_DATA),
34668    #[doc = "Delete all mission items at once."]
34669    #[doc = ""]
34670    #[doc = "ID: 45"]
34671    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
34672    #[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
34673    #[doc = ""]
34674    #[doc = "ID: 44"]
34675    MISSION_COUNT(MISSION_COUNT_DATA),
34676    #[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
34677    #[doc = ""]
34678    #[doc = "ID: 42"]
34679    MISSION_CURRENT(MISSION_CURRENT_DATA),
34680    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34681    #[doc = ""]
34682    #[doc = "ID: 39"]
34683    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
34684    MISSION_ITEM(MISSION_ITEM_DATA),
34685    #[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
34686    #[doc = ""]
34687    #[doc = "ID: 73"]
34688    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
34689    #[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
34690    #[doc = ""]
34691    #[doc = "ID: 46"]
34692    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
34693    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
34694    #[doc = ""]
34695    #[doc = "ID: 40"]
34696    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
34697    MISSION_REQUEST(MISSION_REQUEST_DATA),
34698    #[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
34699    #[doc = ""]
34700    #[doc = "ID: 51"]
34701    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
34702    #[doc = "Request the overall list of mission items from the system/component."]
34703    #[doc = ""]
34704    #[doc = "ID: 43"]
34705    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
34706    #[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
34707    #[doc = ""]
34708    #[doc = "ID: 37"]
34709    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
34710    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
34711    #[doc = ""]
34712    #[doc = "ID: 41"]
34713    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
34714    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
34715    #[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
34716    #[doc = ""]
34717    #[doc = "ID: 38"]
34718    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
34719    #[doc = "Orientation of a mount."]
34720    #[doc = ""]
34721    #[doc = "ID: 265"]
34722    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
34723    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
34724    #[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34725    #[doc = ""]
34726    #[doc = "ID: 251"]
34727    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
34728    #[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
34729    #[doc = ""]
34730    #[doc = "ID: 252"]
34731    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
34732    #[doc = "The state of the navigation and position controller."]
34733    #[doc = ""]
34734    #[doc = "ID: 62"]
34735    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
34736    #[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
34737    #[doc = ""]
34738    #[doc = "ID: 330"]
34739    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
34740    #[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
34741    #[doc = ""]
34742    #[doc = "ID: 331"]
34743    ODOMETRY(ODOMETRY_DATA),
34744    #[doc = "Hardware status sent by an onboard computer."]
34745    #[doc = ""]
34746    #[doc = "ID: 390"]
34747    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
34748    #[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
34749    #[doc = ""]
34750    #[doc = "ID: 12918"]
34751    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
34752    #[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
34753    #[doc = ""]
34754    #[doc = "ID: 12902"]
34755    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
34756    #[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
34757    #[doc = ""]
34758    #[doc = "ID: 12900"]
34759    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
34760    #[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
34761    #[doc = ""]
34762    #[doc = "ID: 12901"]
34763    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
34764    #[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
34765    #[doc = ""]
34766    #[doc = "ID: 12915"]
34767    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
34768    #[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
34769    #[doc = ""]
34770    #[doc = "ID: 12905"]
34771    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
34772    #[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
34773    #[doc = ""]
34774    #[doc = "ID: 12903"]
34775    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
34776    #[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
34777    #[doc = ""]
34778    #[doc = "ID: 12904"]
34779    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
34780    #[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
34781    #[doc = ""]
34782    #[doc = "ID: 12919"]
34783    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
34784    #[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
34785    #[doc = ""]
34786    #[doc = "ID: 100"]
34787    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
34788    #[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
34789    #[doc = ""]
34790    #[doc = "ID: 106"]
34791    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
34792    #[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
34793    #[doc = ""]
34794    #[doc = "ID: 360"]
34795    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
34796    #[doc = "Response from a PARAM_EXT_SET message."]
34797    #[doc = ""]
34798    #[doc = "ID: 324"]
34799    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
34800    #[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
34801    #[doc = ""]
34802    #[doc = "ID: 321"]
34803    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
34804    #[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
34805    #[doc = ""]
34806    #[doc = "ID: 320"]
34807    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
34808    #[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
34809    #[doc = ""]
34810    #[doc = "ID: 323"]
34811    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
34812    #[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
34813    #[doc = ""]
34814    #[doc = "ID: 322"]
34815    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
34816    #[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
34817    #[doc = ""]
34818    #[doc = "ID: 50"]
34819    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
34820    #[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34821    #[doc = ""]
34822    #[doc = "ID: 21"]
34823    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
34824    #[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
34825    #[doc = ""]
34826    #[doc = "ID: 20"]
34827    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
34828    #[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34829    #[doc = ""]
34830    #[doc = "ID: 23"]
34831    PARAM_SET(PARAM_SET_DATA),
34832    #[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
34833    #[doc = ""]
34834    #[doc = "ID: 22"]
34835    PARAM_VALUE(PARAM_VALUE_DATA),
34836    #[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
34837    #[doc = ""]
34838    #[doc = "ID: 4"]
34839    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
34840    PING(PING_DATA),
34841    #[doc = "Control vehicle tone generation (buzzer)."]
34842    #[doc = ""]
34843    #[doc = "ID: 258"]
34844    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
34845    PLAY_TUNE(PLAY_TUNE_DATA),
34846    #[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
34847    #[doc = ""]
34848    #[doc = "ID: 400"]
34849    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
34850    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
34851    #[doc = ""]
34852    #[doc = "ID: 87"]
34853    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
34854    #[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
34855    #[doc = ""]
34856    #[doc = "ID: 85"]
34857    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
34858    #[doc = "Power supply status."]
34859    #[doc = ""]
34860    #[doc = "ID: 125"]
34861    POWER_STATUS(POWER_STATUS_DATA),
34862    #[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
34863    #[doc = ""]
34864    #[doc = "ID: 300"]
34865    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
34866    #[doc = "Status generated by radio and injected into MAVLink stream."]
34867    #[doc = ""]
34868    #[doc = "ID: 109"]
34869    RADIO_STATUS(RADIO_STATUS_DATA),
34870    #[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
34871    #[doc = ""]
34872    #[doc = "ID: 27"]
34873    RAW_IMU(RAW_IMU_DATA),
34874    #[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
34875    #[doc = ""]
34876    #[doc = "ID: 28"]
34877    RAW_PRESSURE(RAW_PRESSURE_DATA),
34878    #[doc = "RPM sensor data message."]
34879    #[doc = ""]
34880    #[doc = "ID: 339"]
34881    RAW_RPM(RAW_RPM_DATA),
34882    #[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34883    #[doc = ""]
34884    #[doc = "ID: 65"]
34885    RC_CHANNELS(RC_CHANNELS_DATA),
34886    #[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
34887    #[doc = ""]
34888    #[doc = "ID: 70"]
34889    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
34890    #[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
34891    #[doc = ""]
34892    #[doc = "ID: 35"]
34893    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
34894    #[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
34895    #[doc = ""]
34896    #[doc = "ID: 34"]
34897    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
34898    #[doc = "Request a data stream."]
34899    #[doc = ""]
34900    #[doc = "ID: 66"]
34901    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
34902    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
34903    #[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
34904    #[doc = ""]
34905    #[doc = "ID: 412"]
34906    REQUEST_EVENT(REQUEST_EVENT_DATA),
34907    #[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
34908    #[doc = ""]
34909    #[doc = "ID: 142"]
34910    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
34911    #[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
34912    #[doc = ""]
34913    #[doc = "ID: 413"]
34914    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
34915    #[doc = "Read out the safety zone the MAV currently assumes."]
34916    #[doc = ""]
34917    #[doc = "ID: 55"]
34918    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
34919    #[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
34920    #[doc = ""]
34921    #[doc = "ID: 54"]
34922    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
34923    #[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
34924    #[doc = ""]
34925    #[doc = "ID: 26"]
34926    SCALED_IMU(SCALED_IMU_DATA),
34927    #[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
34928    #[doc = ""]
34929    #[doc = "ID: 116"]
34930    SCALED_IMU2(SCALED_IMU2_DATA),
34931    #[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
34932    #[doc = ""]
34933    #[doc = "ID: 129"]
34934    SCALED_IMU3(SCALED_IMU3_DATA),
34935    #[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
34936    #[doc = ""]
34937    #[doc = "ID: 29"]
34938    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
34939    #[doc = "Barometer readings for 2nd barometer."]
34940    #[doc = ""]
34941    #[doc = "ID: 137"]
34942    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
34943    #[doc = "Barometer readings for 3rd barometer."]
34944    #[doc = ""]
34945    #[doc = "ID: 143"]
34946    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
34947    #[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
34948    #[doc = ""]
34949    #[doc = "ID: 126"]
34950    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
34951    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F13: format."]
34952    #[doc = ""]
34953    #[doc = "ID: 177"]
34954    SERIAL_UDB_EXTRA_F13(SERIAL_UDB_EXTRA_F13_DATA),
34955    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F14: format."]
34956    #[doc = ""]
34957    #[doc = "ID: 178"]
34958    SERIAL_UDB_EXTRA_F14(SERIAL_UDB_EXTRA_F14_DATA),
34959    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F15 format."]
34960    #[doc = ""]
34961    #[doc = "ID: 179"]
34962    SERIAL_UDB_EXTRA_F15(SERIAL_UDB_EXTRA_F15_DATA),
34963    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F16 format."]
34964    #[doc = ""]
34965    #[doc = "ID: 180"]
34966    SERIAL_UDB_EXTRA_F16(SERIAL_UDB_EXTRA_F16_DATA),
34967    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F17 format."]
34968    #[doc = ""]
34969    #[doc = "ID: 183"]
34970    SERIAL_UDB_EXTRA_F17(SERIAL_UDB_EXTRA_F17_DATA),
34971    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F18 format."]
34972    #[doc = ""]
34973    #[doc = "ID: 184"]
34974    SERIAL_UDB_EXTRA_F18(SERIAL_UDB_EXTRA_F18_DATA),
34975    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F19 format."]
34976    #[doc = ""]
34977    #[doc = "ID: 185"]
34978    SERIAL_UDB_EXTRA_F19(SERIAL_UDB_EXTRA_F19_DATA),
34979    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F20 format."]
34980    #[doc = ""]
34981    #[doc = "ID: 186"]
34982    SERIAL_UDB_EXTRA_F20(SERIAL_UDB_EXTRA_F20_DATA),
34983    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F21 format."]
34984    #[doc = ""]
34985    #[doc = "ID: 187"]
34986    SERIAL_UDB_EXTRA_F21(SERIAL_UDB_EXTRA_F21_DATA),
34987    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F22 format."]
34988    #[doc = ""]
34989    #[doc = "ID: 188"]
34990    SERIAL_UDB_EXTRA_F22(SERIAL_UDB_EXTRA_F22_DATA),
34991    #[doc = "Backwards compatible MAVLink version of SERIAL_UDB_EXTRA - F2: Format Part A."]
34992    #[doc = ""]
34993    #[doc = "ID: 170"]
34994    SERIAL_UDB_EXTRA_F2_A(SERIAL_UDB_EXTRA_F2_A_DATA),
34995    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA - F2: Part B."]
34996    #[doc = ""]
34997    #[doc = "ID: 171"]
34998    SERIAL_UDB_EXTRA_F2_B(SERIAL_UDB_EXTRA_F2_B_DATA),
34999    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F4: format."]
35000    #[doc = ""]
35001    #[doc = "ID: 172"]
35002    SERIAL_UDB_EXTRA_F4(SERIAL_UDB_EXTRA_F4_DATA),
35003    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F5: format."]
35004    #[doc = ""]
35005    #[doc = "ID: 173"]
35006    SERIAL_UDB_EXTRA_F5(SERIAL_UDB_EXTRA_F5_DATA),
35007    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F6: format."]
35008    #[doc = ""]
35009    #[doc = "ID: 174"]
35010    SERIAL_UDB_EXTRA_F6(SERIAL_UDB_EXTRA_F6_DATA),
35011    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F7: format."]
35012    #[doc = ""]
35013    #[doc = "ID: 175"]
35014    SERIAL_UDB_EXTRA_F7(SERIAL_UDB_EXTRA_F7_DATA),
35015    #[doc = "Backwards compatible version of SERIAL_UDB_EXTRA F8: format."]
35016    #[doc = ""]
35017    #[doc = "ID: 176"]
35018    SERIAL_UDB_EXTRA_F8(SERIAL_UDB_EXTRA_F8_DATA),
35019    #[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
35020    #[doc = ""]
35021    #[doc = "ID: 36"]
35022    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
35023    #[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
35024    #[doc = ""]
35025    #[doc = "ID: 256"]
35026    SETUP_SIGNING(SETUP_SIGNING_DATA),
35027    #[doc = "Set the vehicle attitude and body angular rates."]
35028    #[doc = ""]
35029    #[doc = "ID: 139"]
35030    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
35031    #[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
35032    #[doc = ""]
35033    #[doc = "ID: 82"]
35034    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
35035    #[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
35036    #[doc = ""]
35037    #[doc = "ID: 48"]
35038    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
35039    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
35040    #[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
35041    #[doc = ""]
35042    #[doc = "ID: 243"]
35043    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
35044    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
35045    #[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
35046    #[doc = ""]
35047    #[doc = "ID: 11"]
35048    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
35049    SET_MODE(SET_MODE_DATA),
35050    #[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
35051    #[doc = ""]
35052    #[doc = "ID: 86"]
35053    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
35054    #[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
35055    #[doc = ""]
35056    #[doc = "ID: 84"]
35057    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
35058    #[doc = "Status of simulation environment, if used."]
35059    #[doc = ""]
35060    #[doc = "ID: 108"]
35061    SIM_STATE(SIM_STATE_DATA),
35062    #[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
35063    #[doc = ""]
35064    #[doc = "ID: 370"]
35065    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
35066    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
35067    #[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
35068    #[doc = ""]
35069    #[doc = "ID: 253"]
35070    STATUSTEXT(STATUSTEXT_DATA),
35071    #[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
35072    #[doc = ""]
35073    #[doc = "ID: 261"]
35074    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
35075    #[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
35076    #[doc = ""]
35077    #[doc = "ID: 401"]
35078    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
35079    #[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
35080    #[doc = ""]
35081    #[doc = "ID: 2"]
35082    SYSTEM_TIME(SYSTEM_TIME_DATA),
35083    #[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
35084    #[doc = ""]
35085    #[doc = "ID: 1"]
35086    SYS_STATUS(SYS_STATUS_DATA),
35087    #[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
35088    #[doc = ""]
35089    #[doc = "ID: 135"]
35090    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
35091    #[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35092    #[doc = ""]
35093    #[doc = "ID: 134"]
35094    TERRAIN_DATA(TERRAIN_DATA_DATA),
35095    #[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35096    #[doc = ""]
35097    #[doc = "ID: 136"]
35098    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
35099    #[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
35100    #[doc = ""]
35101    #[doc = "ID: 133"]
35102    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
35103    #[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
35104    #[doc = ""]
35105    #[doc = "ID: 111"]
35106    TIMESYNC(TIMESYNC_DATA),
35107    #[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
35108    #[doc = ""]
35109    #[doc = "ID: 380"]
35110    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
35111    #[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
35112    #[doc = ""]
35113    #[doc = "ID: 333"]
35114    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
35115    #[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
35116    #[doc = ""]
35117    #[doc = "ID: 332"]
35118    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
35119    #[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
35120    #[doc = ""]
35121    #[doc = "ID: 385"]
35122    TUNNEL(TUNNEL_DATA),
35123    #[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
35124    #[doc = ""]
35125    #[doc = "ID: 311"]
35126    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
35127    #[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
35128    #[doc = ""]
35129    #[doc = "ID: 310"]
35130    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
35131    #[doc = "The global position resulting from GPS and sensor fusion."]
35132    #[doc = ""]
35133    #[doc = "ID: 340"]
35134    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
35135    #[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
35136    #[doc = ""]
35137    #[doc = "ID: 248"]
35138    V2_EXTENSION(V2_EXTENSION_DATA),
35139    #[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
35140    #[doc = ""]
35141    #[doc = "ID: 74"]
35142    VFR_HUD(VFR_HUD_DATA),
35143    #[doc = "Vibration levels and accelerometer clipping."]
35144    #[doc = ""]
35145    #[doc = "ID: 241"]
35146    VIBRATION(VIBRATION_DATA),
35147    #[doc = "Global position estimate from a Vicon motion system source."]
35148    #[doc = ""]
35149    #[doc = "ID: 104"]
35150    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
35151    #[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
35152    #[doc = ""]
35153    #[doc = "ID: 269"]
35154    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
35155    #[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
35156    #[doc = ""]
35157    #[doc = "ID: 270"]
35158    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
35159    #[doc = "Local position/attitude estimate from a vision source."]
35160    #[doc = ""]
35161    #[doc = "ID: 102"]
35162    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
35163    #[doc = "Speed estimate from a vision source."]
35164    #[doc = ""]
35165    #[doc = "ID: 103"]
35166    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
35167    #[doc = "Cumulative distance traveled for each reported wheel."]
35168    #[doc = ""]
35169    #[doc = "ID: 9000"]
35170    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
35171    #[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
35172    #[doc = ""]
35173    #[doc = "ID: 299"]
35174    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
35175    #[doc = "Winch status."]
35176    #[doc = ""]
35177    #[doc = "ID: 9005"]
35178    WINCH_STATUS(WINCH_STATUS_DATA),
35179    #[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
35180    #[doc = ""]
35181    #[doc = "ID: 231"]
35182    WIND_COV(WIND_COV_DATA),
35183}
35184impl MavMessage {
35185    pub const fn all_ids() -> &'static [u32] {
35186        &[
35187            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
35188            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
35189            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
35190            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
35191            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
35192            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
35193            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
35194            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
35195            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
35196            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
35197            148u32, 149u32, 150u32, 151u32, 152u32, 153u32, 155u32, 156u32, 157u32, 158u32, 162u32,
35198            170u32, 171u32, 172u32, 173u32, 174u32, 175u32, 176u32, 177u32, 178u32, 179u32, 180u32,
35199            181u32, 182u32, 183u32, 184u32, 185u32, 186u32, 187u32, 188u32, 192u32, 225u32, 230u32,
35200            231u32, 232u32, 233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32,
35201            247u32, 248u32, 249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32,
35202            259u32, 260u32, 261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32,
35203            270u32, 271u32, 275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32,
35204            286u32, 287u32, 288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32,
35205            321u32, 322u32, 323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32,
35206            339u32, 340u32, 350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32,
35207            386u32, 387u32, 388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32,
35208            412u32, 413u32, 435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32,
35209            12902u32, 12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
35210        ]
35211    }
35212}
35213impl Message for MavMessage {
35214    fn parse(
35215        version: MavlinkVersion,
35216        id: u32,
35217        payload: &[u8],
35218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
35219        match id {
35220            ACTUATOR_CONTROL_TARGET_DATA::ID => {
35221                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35222                    .map(Self::ACTUATOR_CONTROL_TARGET)
35223            }
35224            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
35225                .map(Self::ACTUATOR_OUTPUT_STATUS),
35226            ADSB_VEHICLE_DATA::ID => {
35227                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
35228            }
35229            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::deser(version, payload).map(Self::AIRSPEEDS),
35230            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
35231            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
35232            ALTITUDES_DATA::ID => ALTITUDES_DATA::deser(version, payload).map(Self::ALTITUDES),
35233            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
35234            ATTITUDE_QUATERNION_DATA::ID => {
35235                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
35236            }
35237            ATTITUDE_QUATERNION_COV_DATA::ID => {
35238                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
35239                    .map(Self::ATTITUDE_QUATERNION_COV)
35240            }
35241            ATTITUDE_TARGET_DATA::ID => {
35242                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
35243            }
35244            ATT_POS_MOCAP_DATA::ID => {
35245                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
35246            }
35247            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
35248            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
35249                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
35250                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
35251            }
35252            AUTOPILOT_VERSION_DATA::ID => {
35253                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
35254            }
35255            AVAILABLE_MODES_DATA::ID => {
35256                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
35257            }
35258            AVAILABLE_MODES_MONITOR_DATA::ID => {
35259                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
35260                    .map(Self::AVAILABLE_MODES_MONITOR)
35261            }
35262            BATTERY_INFO_DATA::ID => {
35263                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
35264            }
35265            BATTERY_STATUS_DATA::ID => {
35266                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
35267            }
35268            BUTTON_CHANGE_DATA::ID => {
35269                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
35270            }
35271            CAMERA_CAPTURE_STATUS_DATA::ID => {
35272                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
35273            }
35274            CAMERA_FOV_STATUS_DATA::ID => {
35275                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
35276            }
35277            CAMERA_IMAGE_CAPTURED_DATA::ID => {
35278                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
35279            }
35280            CAMERA_INFORMATION_DATA::ID => {
35281                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
35282            }
35283            CAMERA_SETTINGS_DATA::ID => {
35284                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
35285            }
35286            CAMERA_THERMAL_RANGE_DATA::ID => {
35287                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
35288            }
35289            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
35290                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
35291                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
35292            }
35293            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
35294                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
35295                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
35296            }
35297            CAMERA_TRIGGER_DATA::ID => {
35298                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
35299            }
35300            CANFD_FRAME_DATA::ID => {
35301                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
35302            }
35303            CAN_FILTER_MODIFY_DATA::ID => {
35304                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
35305            }
35306            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
35307            CELLULAR_CONFIG_DATA::ID => {
35308                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
35309            }
35310            CELLULAR_STATUS_DATA::ID => {
35311                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
35312            }
35313            CHANGE_OPERATOR_CONTROL_DATA::ID => {
35314                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
35315                    .map(Self::CHANGE_OPERATOR_CONTROL)
35316            }
35317            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
35318                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
35319                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
35320            }
35321            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
35322            COMMAND_ACK_DATA::ID => {
35323                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
35324            }
35325            COMMAND_CANCEL_DATA::ID => {
35326                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
35327            }
35328            COMMAND_INT_DATA::ID => {
35329                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
35330            }
35331            COMMAND_LONG_DATA::ID => {
35332                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
35333            }
35334            COMPONENT_INFORMATION_DATA::ID => {
35335                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
35336            }
35337            COMPONENT_INFORMATION_BASIC_DATA::ID => {
35338                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
35339                    .map(Self::COMPONENT_INFORMATION_BASIC)
35340            }
35341            COMPONENT_METADATA_DATA::ID => {
35342                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
35343            }
35344            CONTROL_SYSTEM_STATE_DATA::ID => {
35345                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
35346            }
35347            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
35348                .map(Self::CURRENT_EVENT_SEQUENCE),
35349            CURRENT_MODE_DATA::ID => {
35350                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
35351            }
35352            DATA_STREAM_DATA::ID => {
35353                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
35354            }
35355            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
35356                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
35357                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
35358            }
35359            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
35360            DEBUG_FLOAT_ARRAY_DATA::ID => {
35361                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
35362            }
35363            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
35364            DISTANCE_SENSOR_DATA::ID => {
35365                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
35366            }
35367            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
35368            ENCAPSULATED_DATA_DATA::ID => {
35369                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
35370            }
35371            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
35372            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
35373            ESTIMATOR_STATUS_DATA::ID => {
35374                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
35375            }
35376            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
35377            EXTENDED_SYS_STATE_DATA::ID => {
35378                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
35379            }
35380            FENCE_STATUS_DATA::ID => {
35381                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
35382            }
35383            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
35384                .map(Self::FILE_TRANSFER_PROTOCOL),
35385            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => {
35386                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::deser(version, payload)
35387                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION)
35388            }
35389            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
35390                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::deser(version, payload)
35391                    .map(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK)
35392            }
35393            FLEXIFUNCTION_COMMAND_DATA::ID => {
35394                FLEXIFUNCTION_COMMAND_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_COMMAND)
35395            }
35396            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => {
35397                FLEXIFUNCTION_COMMAND_ACK_DATA::deser(version, payload)
35398                    .map(Self::FLEXIFUNCTION_COMMAND_ACK)
35399            }
35400            FLEXIFUNCTION_DIRECTORY_DATA::ID => {
35401                FLEXIFUNCTION_DIRECTORY_DATA::deser(version, payload)
35402                    .map(Self::FLEXIFUNCTION_DIRECTORY)
35403            }
35404            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => {
35405                FLEXIFUNCTION_DIRECTORY_ACK_DATA::deser(version, payload)
35406                    .map(Self::FLEXIFUNCTION_DIRECTORY_ACK)
35407            }
35408            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::deser(version, payload)
35409                .map(Self::FLEXIFUNCTION_READ_REQ),
35410            FLEXIFUNCTION_SET_DATA::ID => {
35411                FLEXIFUNCTION_SET_DATA::deser(version, payload).map(Self::FLEXIFUNCTION_SET)
35412            }
35413            FLIGHT_INFORMATION_DATA::ID => {
35414                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
35415            }
35416            FOLLOW_TARGET_DATA::ID => {
35417                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
35418            }
35419            FUEL_STATUS_DATA::ID => {
35420                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
35421            }
35422            GENERATOR_STATUS_DATA::ID => {
35423                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
35424            }
35425            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
35426                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
35427                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
35428            }
35429            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
35430                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
35431                    .map(Self::GIMBAL_DEVICE_INFORMATION)
35432            }
35433            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
35434                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
35435                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
35436            }
35437            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
35438                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
35439                    .map(Self::GIMBAL_MANAGER_INFORMATION)
35440            }
35441            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
35442                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
35443                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
35444            }
35445            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
35446                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
35447                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
35448            }
35449            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
35450                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
35451                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
35452            }
35453            GIMBAL_MANAGER_STATUS_DATA::ID => {
35454                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
35455            }
35456            GLOBAL_POSITION_INT_DATA::ID => {
35457                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
35458            }
35459            GLOBAL_POSITION_INT_COV_DATA::ID => {
35460                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
35461                    .map(Self::GLOBAL_POSITION_INT_COV)
35462            }
35463            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
35464                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35465                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
35466            }
35467            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
35468            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
35469            GPS_GLOBAL_ORIGIN_DATA::ID => {
35470                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
35471            }
35472            GPS_INJECT_DATA_DATA::ID => {
35473                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
35474            }
35475            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
35476            GPS_RAW_INT_DATA::ID => {
35477                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
35478            }
35479            GPS_RTCM_DATA_DATA::ID => {
35480                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
35481            }
35482            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
35483            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
35484            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
35485            HIGHRES_IMU_DATA::ID => {
35486                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
35487            }
35488            HIGH_LATENCY_DATA::ID => {
35489                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
35490            }
35491            HIGH_LATENCY2_DATA::ID => {
35492                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
35493            }
35494            HIL_ACTUATOR_CONTROLS_DATA::ID => {
35495                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
35496            }
35497            HIL_CONTROLS_DATA::ID => {
35498                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
35499            }
35500            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
35501            HIL_OPTICAL_FLOW_DATA::ID => {
35502                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
35503            }
35504            HIL_RC_INPUTS_RAW_DATA::ID => {
35505                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
35506            }
35507            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
35508            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
35509            HIL_STATE_QUATERNION_DATA::ID => {
35510                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
35511            }
35512            HOME_POSITION_DATA::ID => {
35513                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
35514            }
35515            HYGROMETER_SENSOR_DATA::ID => {
35516                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
35517            }
35518            ILLUMINATOR_STATUS_DATA::ID => {
35519                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
35520            }
35521            ISBD_LINK_STATUS_DATA::ID => {
35522                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
35523            }
35524            LANDING_TARGET_DATA::ID => {
35525                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
35526            }
35527            LINK_NODE_STATUS_DATA::ID => {
35528                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
35529            }
35530            LOCAL_POSITION_NED_DATA::ID => {
35531                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
35532            }
35533            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
35534                .map(Self::LOCAL_POSITION_NED_COV),
35535            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
35536                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
35537                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
35538            }
35539            LOGGING_ACK_DATA::ID => {
35540                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
35541            }
35542            LOGGING_DATA_DATA::ID => {
35543                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
35544            }
35545            LOGGING_DATA_ACKED_DATA::ID => {
35546                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
35547            }
35548            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
35549            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
35550            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
35551            LOG_REQUEST_DATA_DATA::ID => {
35552                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
35553            }
35554            LOG_REQUEST_END_DATA::ID => {
35555                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
35556            }
35557            LOG_REQUEST_LIST_DATA::ID => {
35558                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
35559            }
35560            MAG_CAL_REPORT_DATA::ID => {
35561                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
35562            }
35563            MANUAL_CONTROL_DATA::ID => {
35564                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
35565            }
35566            MANUAL_SETPOINT_DATA::ID => {
35567                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
35568            }
35569            MEMORY_VECT_DATA::ID => {
35570                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
35571            }
35572            MESSAGE_INTERVAL_DATA::ID => {
35573                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
35574            }
35575            MISSION_ACK_DATA::ID => {
35576                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
35577            }
35578            MISSION_CLEAR_ALL_DATA::ID => {
35579                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
35580            }
35581            MISSION_COUNT_DATA::ID => {
35582                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
35583            }
35584            MISSION_CURRENT_DATA::ID => {
35585                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
35586            }
35587            MISSION_ITEM_DATA::ID => {
35588                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
35589            }
35590            MISSION_ITEM_INT_DATA::ID => {
35591                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
35592            }
35593            MISSION_ITEM_REACHED_DATA::ID => {
35594                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
35595            }
35596            MISSION_REQUEST_DATA::ID => {
35597                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
35598            }
35599            MISSION_REQUEST_INT_DATA::ID => {
35600                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
35601            }
35602            MISSION_REQUEST_LIST_DATA::ID => {
35603                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
35604            }
35605            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
35606                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
35607                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
35608            }
35609            MISSION_SET_CURRENT_DATA::ID => {
35610                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
35611            }
35612            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
35613                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
35614                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
35615            }
35616            MOUNT_ORIENTATION_DATA::ID => {
35617                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
35618            }
35619            NAMED_VALUE_FLOAT_DATA::ID => {
35620                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
35621            }
35622            NAMED_VALUE_INT_DATA::ID => {
35623                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
35624            }
35625            NAV_CONTROLLER_OUTPUT_DATA::ID => {
35626                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
35627            }
35628            OBSTACLE_DISTANCE_DATA::ID => {
35629                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
35630            }
35631            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
35632            ONBOARD_COMPUTER_STATUS_DATA::ID => {
35633                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
35634                    .map(Self::ONBOARD_COMPUTER_STATUS)
35635            }
35636            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
35637                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
35638                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
35639            }
35640            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
35641                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
35642                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
35643            }
35644            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
35645                .map(Self::OPEN_DRONE_ID_BASIC_ID),
35646            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
35647                .map(Self::OPEN_DRONE_ID_LOCATION),
35648            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
35649                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
35650                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
35651            }
35652            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
35653                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
35654                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
35655            }
35656            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
35657                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
35658            }
35659            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
35660                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
35661            }
35662            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
35663                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
35664                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
35665            }
35666            OPTICAL_FLOW_DATA::ID => {
35667                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
35668            }
35669            OPTICAL_FLOW_RAD_DATA::ID => {
35670                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
35671            }
35672            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
35673                .map(Self::ORBIT_EXECUTION_STATUS),
35674            PARAM_EXT_ACK_DATA::ID => {
35675                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
35676            }
35677            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
35678                .map(Self::PARAM_EXT_REQUEST_LIST),
35679            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
35680                .map(Self::PARAM_EXT_REQUEST_READ),
35681            PARAM_EXT_SET_DATA::ID => {
35682                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
35683            }
35684            PARAM_EXT_VALUE_DATA::ID => {
35685                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
35686            }
35687            PARAM_MAP_RC_DATA::ID => {
35688                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
35689            }
35690            PARAM_REQUEST_LIST_DATA::ID => {
35691                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
35692            }
35693            PARAM_REQUEST_READ_DATA::ID => {
35694                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
35695            }
35696            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
35697            PARAM_VALUE_DATA::ID => {
35698                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
35699            }
35700            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
35701            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
35702            PLAY_TUNE_V2_DATA::ID => {
35703                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
35704            }
35705            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35706                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35707                    .map(Self::POSITION_TARGET_GLOBAL_INT)
35708            }
35709            POSITION_TARGET_LOCAL_NED_DATA::ID => {
35710                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35711                    .map(Self::POSITION_TARGET_LOCAL_NED)
35712            }
35713            POWER_STATUS_DATA::ID => {
35714                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
35715            }
35716            PROTOCOL_VERSION_DATA::ID => {
35717                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
35718            }
35719            RADIO_STATUS_DATA::ID => {
35720                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
35721            }
35722            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
35723            RAW_PRESSURE_DATA::ID => {
35724                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
35725            }
35726            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
35727            RC_CHANNELS_DATA::ID => {
35728                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
35729            }
35730            RC_CHANNELS_OVERRIDE_DATA::ID => {
35731                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
35732            }
35733            RC_CHANNELS_RAW_DATA::ID => {
35734                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
35735            }
35736            RC_CHANNELS_SCALED_DATA::ID => {
35737                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
35738            }
35739            REQUEST_DATA_STREAM_DATA::ID => {
35740                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
35741            }
35742            REQUEST_EVENT_DATA::ID => {
35743                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
35744            }
35745            RESOURCE_REQUEST_DATA::ID => {
35746                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
35747            }
35748            RESPONSE_EVENT_ERROR_DATA::ID => {
35749                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
35750            }
35751            SAFETY_ALLOWED_AREA_DATA::ID => {
35752                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
35753            }
35754            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
35755                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
35756                    .map(Self::SAFETY_SET_ALLOWED_AREA)
35757            }
35758            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
35759            SCALED_IMU2_DATA::ID => {
35760                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
35761            }
35762            SCALED_IMU3_DATA::ID => {
35763                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
35764            }
35765            SCALED_PRESSURE_DATA::ID => {
35766                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
35767            }
35768            SCALED_PRESSURE2_DATA::ID => {
35769                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
35770            }
35771            SCALED_PRESSURE3_DATA::ID => {
35772                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
35773            }
35774            SERIAL_CONTROL_DATA::ID => {
35775                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
35776            }
35777            SERIAL_UDB_EXTRA_F13_DATA::ID => {
35778                SERIAL_UDB_EXTRA_F13_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F13)
35779            }
35780            SERIAL_UDB_EXTRA_F14_DATA::ID => {
35781                SERIAL_UDB_EXTRA_F14_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F14)
35782            }
35783            SERIAL_UDB_EXTRA_F15_DATA::ID => {
35784                SERIAL_UDB_EXTRA_F15_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F15)
35785            }
35786            SERIAL_UDB_EXTRA_F16_DATA::ID => {
35787                SERIAL_UDB_EXTRA_F16_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F16)
35788            }
35789            SERIAL_UDB_EXTRA_F17_DATA::ID => {
35790                SERIAL_UDB_EXTRA_F17_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F17)
35791            }
35792            SERIAL_UDB_EXTRA_F18_DATA::ID => {
35793                SERIAL_UDB_EXTRA_F18_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F18)
35794            }
35795            SERIAL_UDB_EXTRA_F19_DATA::ID => {
35796                SERIAL_UDB_EXTRA_F19_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F19)
35797            }
35798            SERIAL_UDB_EXTRA_F20_DATA::ID => {
35799                SERIAL_UDB_EXTRA_F20_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F20)
35800            }
35801            SERIAL_UDB_EXTRA_F21_DATA::ID => {
35802                SERIAL_UDB_EXTRA_F21_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F21)
35803            }
35804            SERIAL_UDB_EXTRA_F22_DATA::ID => {
35805                SERIAL_UDB_EXTRA_F22_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F22)
35806            }
35807            SERIAL_UDB_EXTRA_F2_A_DATA::ID => {
35808                SERIAL_UDB_EXTRA_F2_A_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_A)
35809            }
35810            SERIAL_UDB_EXTRA_F2_B_DATA::ID => {
35811                SERIAL_UDB_EXTRA_F2_B_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F2_B)
35812            }
35813            SERIAL_UDB_EXTRA_F4_DATA::ID => {
35814                SERIAL_UDB_EXTRA_F4_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F4)
35815            }
35816            SERIAL_UDB_EXTRA_F5_DATA::ID => {
35817                SERIAL_UDB_EXTRA_F5_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F5)
35818            }
35819            SERIAL_UDB_EXTRA_F6_DATA::ID => {
35820                SERIAL_UDB_EXTRA_F6_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F6)
35821            }
35822            SERIAL_UDB_EXTRA_F7_DATA::ID => {
35823                SERIAL_UDB_EXTRA_F7_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F7)
35824            }
35825            SERIAL_UDB_EXTRA_F8_DATA::ID => {
35826                SERIAL_UDB_EXTRA_F8_DATA::deser(version, payload).map(Self::SERIAL_UDB_EXTRA_F8)
35827            }
35828            SERVO_OUTPUT_RAW_DATA::ID => {
35829                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
35830            }
35831            SETUP_SIGNING_DATA::ID => {
35832                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
35833            }
35834            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
35835                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
35836                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
35837            }
35838            SET_ATTITUDE_TARGET_DATA::ID => {
35839                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
35840            }
35841            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
35842                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
35843            }
35844            SET_HOME_POSITION_DATA::ID => {
35845                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
35846            }
35847            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
35848            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
35849                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
35850                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
35851            }
35852            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
35853                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
35854                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
35855            }
35856            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
35857            SMART_BATTERY_INFO_DATA::ID => {
35858                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
35859            }
35860            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
35861            STORAGE_INFORMATION_DATA::ID => {
35862                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
35863            }
35864            SUPPORTED_TUNES_DATA::ID => {
35865                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
35866            }
35867            SYSTEM_TIME_DATA::ID => {
35868                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
35869            }
35870            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
35871            TERRAIN_CHECK_DATA::ID => {
35872                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
35873            }
35874            TERRAIN_DATA_DATA::ID => {
35875                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
35876            }
35877            TERRAIN_REPORT_DATA::ID => {
35878                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
35879            }
35880            TERRAIN_REQUEST_DATA::ID => {
35881                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
35882            }
35883            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
35884            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
35885                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
35886                    .map(Self::TIME_ESTIMATE_TO_TARGET)
35887            }
35888            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
35889                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
35890                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
35891            }
35892            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
35893                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
35894                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
35895            }
35896            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
35897            UAVCAN_NODE_INFO_DATA::ID => {
35898                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
35899            }
35900            UAVCAN_NODE_STATUS_DATA::ID => {
35901                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
35902            }
35903            UTM_GLOBAL_POSITION_DATA::ID => {
35904                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
35905            }
35906            V2_EXTENSION_DATA::ID => {
35907                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
35908            }
35909            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
35910            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
35911            VICON_POSITION_ESTIMATE_DATA::ID => {
35912                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
35913                    .map(Self::VICON_POSITION_ESTIMATE)
35914            }
35915            VIDEO_STREAM_INFORMATION_DATA::ID => {
35916                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
35917                    .map(Self::VIDEO_STREAM_INFORMATION)
35918            }
35919            VIDEO_STREAM_STATUS_DATA::ID => {
35920                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
35921            }
35922            VISION_POSITION_ESTIMATE_DATA::ID => {
35923                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
35924                    .map(Self::VISION_POSITION_ESTIMATE)
35925            }
35926            VISION_SPEED_ESTIMATE_DATA::ID => {
35927                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
35928            }
35929            WHEEL_DISTANCE_DATA::ID => {
35930                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
35931            }
35932            WIFI_CONFIG_AP_DATA::ID => {
35933                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
35934            }
35935            WINCH_STATUS_DATA::ID => {
35936                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
35937            }
35938            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
35939            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
35940        }
35941    }
35942    fn message_name(&self) -> &'static str {
35943        match self {
35944            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
35945            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
35946            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
35947            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::NAME,
35948            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
35949            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
35950            Self::ALTITUDES(..) => ALTITUDES_DATA::NAME,
35951            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
35952            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
35953            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
35954            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
35955            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
35956            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
35957            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
35958                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
35959            }
35960            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
35961            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
35962            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
35963            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
35964            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
35965            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
35966            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
35967            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
35968            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
35969            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
35970            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
35971            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
35972            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
35973            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
35974            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
35975            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
35976            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
35977            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
35978            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
35979            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
35980            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
35981            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
35982            Self::COLLISION(..) => COLLISION_DATA::NAME,
35983            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
35984            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
35985            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
35986            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
35987            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
35988            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
35989            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
35990            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
35991            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
35992            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
35993            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
35994            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
35995            Self::DEBUG(..) => DEBUG_DATA::NAME,
35996            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
35997            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
35998            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
35999            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
36000            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
36001            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
36002            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
36003            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
36004            Self::EVENT(..) => EVENT_DATA::NAME,
36005            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
36006            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
36007            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
36008            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME,
36009            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
36010                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME
36011            }
36012            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::NAME,
36013            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::NAME,
36014            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::NAME,
36015            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME,
36016            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::NAME,
36017            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::NAME,
36018            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
36019            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
36020            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
36021            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
36022            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
36023            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
36024            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
36025            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
36026            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
36027            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36028                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
36029            }
36030            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
36031            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
36032            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
36033            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
36034            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
36035            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
36036            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
36037            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
36038            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
36039            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
36040            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
36041            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
36042            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
36043            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
36044            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
36045            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
36046            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
36047            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
36048            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
36049            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
36050            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
36051            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
36052            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
36053            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
36054            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
36055            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
36056            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
36057            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
36058            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
36059            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
36060            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
36061            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
36062            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
36063            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
36064            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36065                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
36066            }
36067            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
36068            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
36069            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
36070            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
36071            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
36072            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
36073            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
36074            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
36075            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
36076            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
36077            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
36078            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
36079            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
36080            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
36081            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
36082            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
36083            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
36084            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
36085            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
36086            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
36087            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
36088            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
36089            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
36090            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
36091            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
36092            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
36093            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
36094            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
36095            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
36096            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
36097            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
36098            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
36099            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
36100            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
36101            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
36102            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
36103            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
36104            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
36105            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
36106            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
36107            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
36108            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
36109            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
36110            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
36111            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
36112            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
36113            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
36114            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
36115            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
36116            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
36117            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
36118            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
36119            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
36120            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
36121            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
36122            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
36123            Self::PING(..) => PING_DATA::NAME,
36124            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
36125            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
36126            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36127            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
36128            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
36129            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
36130            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
36131            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
36132            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
36133            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
36134            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
36135            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
36136            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
36137            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
36138            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
36139            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
36140            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
36141            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
36142            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
36143            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
36144            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
36145            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
36146            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
36147            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
36148            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
36149            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
36150            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
36151            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::NAME,
36152            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::NAME,
36153            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::NAME,
36154            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::NAME,
36155            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::NAME,
36156            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::NAME,
36157            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::NAME,
36158            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::NAME,
36159            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::NAME,
36160            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::NAME,
36161            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::NAME,
36162            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::NAME,
36163            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::NAME,
36164            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::NAME,
36165            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::NAME,
36166            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::NAME,
36167            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::NAME,
36168            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
36169            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
36170            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
36171            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
36172            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
36173            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
36174            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
36175            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
36176            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
36177            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
36178            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
36179            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
36180            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
36181            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
36182            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
36183            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
36184            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
36185            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
36186            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
36187            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
36188            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
36189            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
36190            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
36191                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
36192            }
36193            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36194                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
36195            }
36196            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
36197            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
36198            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
36199            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
36200            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
36201            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
36202            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
36203            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
36204            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
36205            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
36206            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
36207            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
36208            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
36209            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
36210            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
36211            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
36212        }
36213    }
36214    fn message_id(&self) -> u32 {
36215        match self {
36216            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
36217            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
36218            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
36219            Self::AIRSPEEDS(..) => AIRSPEEDS_DATA::ID,
36220            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
36221            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
36222            Self::ALTITUDES(..) => ALTITUDES_DATA::ID,
36223            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
36224            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
36225            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
36226            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
36227            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
36228            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
36229            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
36230                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
36231            }
36232            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
36233            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
36234            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
36235            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
36236            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
36237            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
36238            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
36239            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
36240            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
36241            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
36242            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
36243            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
36244            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
36245            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
36246            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
36247            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
36248            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
36249            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
36250            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
36251            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
36252            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
36253            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
36254            Self::COLLISION(..) => COLLISION_DATA::ID,
36255            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
36256            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
36257            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
36258            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
36259            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
36260            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
36261            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
36262            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
36263            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
36264            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
36265            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
36266            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
36267            Self::DEBUG(..) => DEBUG_DATA::ID,
36268            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
36269            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
36270            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
36271            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
36272            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
36273            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
36274            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
36275            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
36276            Self::EVENT(..) => EVENT_DATA::ID,
36277            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
36278            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
36279            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
36280            Self::FLEXIFUNCTION_BUFFER_FUNCTION(..) => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID,
36281            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(..) => {
36282                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID
36283            }
36284            Self::FLEXIFUNCTION_COMMAND(..) => FLEXIFUNCTION_COMMAND_DATA::ID,
36285            Self::FLEXIFUNCTION_COMMAND_ACK(..) => FLEXIFUNCTION_COMMAND_ACK_DATA::ID,
36286            Self::FLEXIFUNCTION_DIRECTORY(..) => FLEXIFUNCTION_DIRECTORY_DATA::ID,
36287            Self::FLEXIFUNCTION_DIRECTORY_ACK(..) => FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID,
36288            Self::FLEXIFUNCTION_READ_REQ(..) => FLEXIFUNCTION_READ_REQ_DATA::ID,
36289            Self::FLEXIFUNCTION_SET(..) => FLEXIFUNCTION_SET_DATA::ID,
36290            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
36291            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
36292            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
36293            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
36294            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
36295            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
36296            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
36297            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
36298            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
36299            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
36300                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
36301            }
36302            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
36303            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
36304            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
36305            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
36306            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
36307            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
36308            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
36309            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
36310            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
36311            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
36312            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
36313            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
36314            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
36315            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
36316            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
36317            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
36318            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
36319            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
36320            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
36321            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
36322            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
36323            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
36324            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
36325            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
36326            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
36327            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
36328            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
36329            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
36330            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
36331            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
36332            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
36333            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
36334            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
36335            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
36336            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
36337                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
36338            }
36339            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
36340            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
36341            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
36342            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
36343            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
36344            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
36345            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
36346            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
36347            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
36348            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
36349            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
36350            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
36351            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
36352            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
36353            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
36354            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
36355            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
36356            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
36357            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
36358            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
36359            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
36360            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
36361            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
36362            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
36363            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
36364            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
36365            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
36366            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
36367            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
36368            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
36369            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
36370            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
36371            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
36372            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
36373            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
36374            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
36375            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
36376            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
36377            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
36378            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
36379            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
36380            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
36381            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
36382            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
36383            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
36384            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
36385            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
36386            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
36387            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
36388            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
36389            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
36390            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
36391            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
36392            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
36393            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
36394            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
36395            Self::PING(..) => PING_DATA::ID,
36396            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
36397            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
36398            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
36399            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
36400            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
36401            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
36402            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
36403            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
36404            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
36405            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
36406            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
36407            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
36408            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
36409            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
36410            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
36411            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
36412            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
36413            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
36414            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
36415            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
36416            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
36417            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
36418            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
36419            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
36420            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
36421            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
36422            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
36423            Self::SERIAL_UDB_EXTRA_F13(..) => SERIAL_UDB_EXTRA_F13_DATA::ID,
36424            Self::SERIAL_UDB_EXTRA_F14(..) => SERIAL_UDB_EXTRA_F14_DATA::ID,
36425            Self::SERIAL_UDB_EXTRA_F15(..) => SERIAL_UDB_EXTRA_F15_DATA::ID,
36426            Self::SERIAL_UDB_EXTRA_F16(..) => SERIAL_UDB_EXTRA_F16_DATA::ID,
36427            Self::SERIAL_UDB_EXTRA_F17(..) => SERIAL_UDB_EXTRA_F17_DATA::ID,
36428            Self::SERIAL_UDB_EXTRA_F18(..) => SERIAL_UDB_EXTRA_F18_DATA::ID,
36429            Self::SERIAL_UDB_EXTRA_F19(..) => SERIAL_UDB_EXTRA_F19_DATA::ID,
36430            Self::SERIAL_UDB_EXTRA_F20(..) => SERIAL_UDB_EXTRA_F20_DATA::ID,
36431            Self::SERIAL_UDB_EXTRA_F21(..) => SERIAL_UDB_EXTRA_F21_DATA::ID,
36432            Self::SERIAL_UDB_EXTRA_F22(..) => SERIAL_UDB_EXTRA_F22_DATA::ID,
36433            Self::SERIAL_UDB_EXTRA_F2_A(..) => SERIAL_UDB_EXTRA_F2_A_DATA::ID,
36434            Self::SERIAL_UDB_EXTRA_F2_B(..) => SERIAL_UDB_EXTRA_F2_B_DATA::ID,
36435            Self::SERIAL_UDB_EXTRA_F4(..) => SERIAL_UDB_EXTRA_F4_DATA::ID,
36436            Self::SERIAL_UDB_EXTRA_F5(..) => SERIAL_UDB_EXTRA_F5_DATA::ID,
36437            Self::SERIAL_UDB_EXTRA_F6(..) => SERIAL_UDB_EXTRA_F6_DATA::ID,
36438            Self::SERIAL_UDB_EXTRA_F7(..) => SERIAL_UDB_EXTRA_F7_DATA::ID,
36439            Self::SERIAL_UDB_EXTRA_F8(..) => SERIAL_UDB_EXTRA_F8_DATA::ID,
36440            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
36441            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
36442            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
36443            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
36444            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
36445            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
36446            Self::SET_MODE(..) => SET_MODE_DATA::ID,
36447            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
36448            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
36449            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
36450            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
36451            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
36452            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
36453            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
36454            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
36455            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
36456            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
36457            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
36458            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
36459            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
36460            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
36461            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
36462            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
36463            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
36464                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
36465            }
36466            Self::TUNNEL(..) => TUNNEL_DATA::ID,
36467            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
36468            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
36469            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
36470            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
36471            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
36472            Self::VIBRATION(..) => VIBRATION_DATA::ID,
36473            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
36474            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
36475            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
36476            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
36477            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
36478            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
36479            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
36480            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
36481            Self::WIND_COV(..) => WIND_COV_DATA::ID,
36482        }
36483    }
36484    fn message_id_from_name(name: &str) -> Option<u32> {
36485        match name {
36486            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
36487            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
36488            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
36489            AIRSPEEDS_DATA::NAME => Some(AIRSPEEDS_DATA::ID),
36490            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
36491            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
36492            ALTITUDES_DATA::NAME => Some(ALTITUDES_DATA::ID),
36493            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
36494            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
36495            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
36496            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
36497            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
36498            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
36499            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
36500                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
36501            }
36502            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
36503            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
36504            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
36505            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
36506            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
36507            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
36508            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
36509            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
36510            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
36511            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
36512            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
36513            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
36514            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
36515            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
36516            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
36517            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
36518            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
36519            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
36520            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
36521            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
36522            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
36523            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
36524            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
36525            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
36526            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
36527            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
36528            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
36529            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
36530            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
36531            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
36532            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
36533            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
36534            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
36535            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
36536            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
36537            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
36538            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
36539            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
36540            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
36541            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
36542            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
36543            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
36544            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
36545            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
36546            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
36547            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
36548            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
36549            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
36550            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::NAME => {
36551                Some(FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID)
36552            }
36553            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::NAME => {
36554                Some(FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID)
36555            }
36556            FLEXIFUNCTION_COMMAND_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_DATA::ID),
36557            FLEXIFUNCTION_COMMAND_ACK_DATA::NAME => Some(FLEXIFUNCTION_COMMAND_ACK_DATA::ID),
36558            FLEXIFUNCTION_DIRECTORY_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_DATA::ID),
36559            FLEXIFUNCTION_DIRECTORY_ACK_DATA::NAME => Some(FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID),
36560            FLEXIFUNCTION_READ_REQ_DATA::NAME => Some(FLEXIFUNCTION_READ_REQ_DATA::ID),
36561            FLEXIFUNCTION_SET_DATA::NAME => Some(FLEXIFUNCTION_SET_DATA::ID),
36562            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
36563            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
36564            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
36565            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
36566            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
36567                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
36568            }
36569            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
36570            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
36571            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
36572            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
36573            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
36574                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
36575            }
36576            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
36577            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
36578            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
36579            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
36580            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
36581                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
36582            }
36583            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
36584            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
36585            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
36586            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
36587            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
36588            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
36589            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
36590            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
36591            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
36592            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
36593            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
36594            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
36595            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
36596            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
36597            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
36598            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
36599            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
36600            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
36601            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
36602            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
36603            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
36604            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
36605            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
36606            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
36607            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
36608            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
36609            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
36610            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
36611            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
36612            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
36613                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
36614            }
36615            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
36616            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
36617            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
36618            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
36619            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
36620            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
36621            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
36622            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
36623            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
36624            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
36625            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
36626            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
36627            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
36628            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
36629            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
36630            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
36631            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
36632            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
36633            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
36634            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
36635            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
36636            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
36637            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
36638            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
36639            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
36640            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
36641            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
36642            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
36643            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
36644            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
36645            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
36646            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
36647            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
36648            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
36649            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
36650            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
36651            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
36652            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
36653            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
36654            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
36655            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
36656            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
36657            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
36658            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
36659            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
36660            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
36661            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
36662            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
36663            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
36664            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
36665            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
36666            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
36667            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
36668            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
36669            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
36670            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
36671            PING_DATA::NAME => Some(PING_DATA::ID),
36672            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
36673            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
36674            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
36675            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
36676            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
36677            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
36678            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
36679            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
36680            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
36681            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
36682            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
36683            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
36684            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
36685            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
36686            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
36687            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
36688            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
36689            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
36690            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
36691            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
36692            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
36693            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
36694            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
36695            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
36696            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
36697            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
36698            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
36699            SERIAL_UDB_EXTRA_F13_DATA::NAME => Some(SERIAL_UDB_EXTRA_F13_DATA::ID),
36700            SERIAL_UDB_EXTRA_F14_DATA::NAME => Some(SERIAL_UDB_EXTRA_F14_DATA::ID),
36701            SERIAL_UDB_EXTRA_F15_DATA::NAME => Some(SERIAL_UDB_EXTRA_F15_DATA::ID),
36702            SERIAL_UDB_EXTRA_F16_DATA::NAME => Some(SERIAL_UDB_EXTRA_F16_DATA::ID),
36703            SERIAL_UDB_EXTRA_F17_DATA::NAME => Some(SERIAL_UDB_EXTRA_F17_DATA::ID),
36704            SERIAL_UDB_EXTRA_F18_DATA::NAME => Some(SERIAL_UDB_EXTRA_F18_DATA::ID),
36705            SERIAL_UDB_EXTRA_F19_DATA::NAME => Some(SERIAL_UDB_EXTRA_F19_DATA::ID),
36706            SERIAL_UDB_EXTRA_F20_DATA::NAME => Some(SERIAL_UDB_EXTRA_F20_DATA::ID),
36707            SERIAL_UDB_EXTRA_F21_DATA::NAME => Some(SERIAL_UDB_EXTRA_F21_DATA::ID),
36708            SERIAL_UDB_EXTRA_F22_DATA::NAME => Some(SERIAL_UDB_EXTRA_F22_DATA::ID),
36709            SERIAL_UDB_EXTRA_F2_A_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_A_DATA::ID),
36710            SERIAL_UDB_EXTRA_F2_B_DATA::NAME => Some(SERIAL_UDB_EXTRA_F2_B_DATA::ID),
36711            SERIAL_UDB_EXTRA_F4_DATA::NAME => Some(SERIAL_UDB_EXTRA_F4_DATA::ID),
36712            SERIAL_UDB_EXTRA_F5_DATA::NAME => Some(SERIAL_UDB_EXTRA_F5_DATA::ID),
36713            SERIAL_UDB_EXTRA_F6_DATA::NAME => Some(SERIAL_UDB_EXTRA_F6_DATA::ID),
36714            SERIAL_UDB_EXTRA_F7_DATA::NAME => Some(SERIAL_UDB_EXTRA_F7_DATA::ID),
36715            SERIAL_UDB_EXTRA_F8_DATA::NAME => Some(SERIAL_UDB_EXTRA_F8_DATA::ID),
36716            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
36717            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
36718            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
36719            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
36720            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
36721            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
36722            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
36723            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
36724                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
36725            }
36726            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
36727                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
36728            }
36729            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
36730            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
36731            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
36732            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
36733            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
36734            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
36735            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
36736            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
36737            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
36738            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
36739            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
36740            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
36741            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
36742            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
36743                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
36744            }
36745            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
36746                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
36747            }
36748            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
36749            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
36750            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
36751            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
36752            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
36753            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
36754            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
36755            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
36756            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
36757            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
36758            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
36759            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
36760            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
36761            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
36762            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
36763            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
36764            _ => None,
36765        }
36766    }
36767    fn default_message_from_id(id: u32) -> Option<Self> {
36768        match id {
36769            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
36770                ACTUATOR_CONTROL_TARGET_DATA::default(),
36771            )),
36772            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
36773                ACTUATOR_OUTPUT_STATUS_DATA::default(),
36774            )),
36775            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
36776            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::default())),
36777            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
36778            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
36779            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::default())),
36780            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
36781            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
36782                ATTITUDE_QUATERNION_DATA::default(),
36783            )),
36784            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
36785                ATTITUDE_QUATERNION_COV_DATA::default(),
36786            )),
36787            ATTITUDE_TARGET_DATA::ID => {
36788                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
36789            }
36790            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
36791            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
36792            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
36793                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
36794                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
36795                ))
36796            }
36797            AUTOPILOT_VERSION_DATA::ID => {
36798                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
36799            }
36800            AVAILABLE_MODES_DATA::ID => {
36801                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
36802            }
36803            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
36804                AVAILABLE_MODES_MONITOR_DATA::default(),
36805            )),
36806            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
36807            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
36808            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
36809            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
36810                CAMERA_CAPTURE_STATUS_DATA::default(),
36811            )),
36812            CAMERA_FOV_STATUS_DATA::ID => {
36813                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
36814            }
36815            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
36816                CAMERA_IMAGE_CAPTURED_DATA::default(),
36817            )),
36818            CAMERA_INFORMATION_DATA::ID => {
36819                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
36820            }
36821            CAMERA_SETTINGS_DATA::ID => {
36822                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
36823            }
36824            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
36825                CAMERA_THERMAL_RANGE_DATA::default(),
36826            )),
36827            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
36828                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
36829            )),
36830            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
36831                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
36832            )),
36833            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
36834            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
36835            CAN_FILTER_MODIFY_DATA::ID => {
36836                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
36837            }
36838            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
36839            CELLULAR_CONFIG_DATA::ID => {
36840                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
36841            }
36842            CELLULAR_STATUS_DATA::ID => {
36843                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
36844            }
36845            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
36846                CHANGE_OPERATOR_CONTROL_DATA::default(),
36847            )),
36848            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
36849                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
36850            )),
36851            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
36852            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
36853            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
36854            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
36855            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
36856            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
36857                COMPONENT_INFORMATION_DATA::default(),
36858            )),
36859            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
36860                COMPONENT_INFORMATION_BASIC_DATA::default(),
36861            )),
36862            COMPONENT_METADATA_DATA::ID => {
36863                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
36864            }
36865            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
36866                CONTROL_SYSTEM_STATE_DATA::default(),
36867            )),
36868            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
36869                CURRENT_EVENT_SEQUENCE_DATA::default(),
36870            )),
36871            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
36872            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
36873            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
36874                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
36875            )),
36876            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
36877            DEBUG_FLOAT_ARRAY_DATA::ID => {
36878                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
36879            }
36880            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
36881            DISTANCE_SENSOR_DATA::ID => {
36882                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
36883            }
36884            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
36885            ENCAPSULATED_DATA_DATA::ID => {
36886                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
36887            }
36888            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
36889            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
36890            ESTIMATOR_STATUS_DATA::ID => {
36891                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
36892            }
36893            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
36894            EXTENDED_SYS_STATE_DATA::ID => {
36895                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
36896            }
36897            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
36898            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
36899                FILE_TRANSFER_PROTOCOL_DATA::default(),
36900            )),
36901            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
36902                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::default(),
36903            )),
36904            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
36905                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
36906                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::default(),
36907                ))
36908            }
36909            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
36910                FLEXIFUNCTION_COMMAND_DATA::default(),
36911            )),
36912            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
36913                FLEXIFUNCTION_COMMAND_ACK_DATA::default(),
36914            )),
36915            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
36916                FLEXIFUNCTION_DIRECTORY_DATA::default(),
36917            )),
36918            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
36919                FLEXIFUNCTION_DIRECTORY_ACK_DATA::default(),
36920            )),
36921            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
36922                FLEXIFUNCTION_READ_REQ_DATA::default(),
36923            )),
36924            FLEXIFUNCTION_SET_DATA::ID => {
36925                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::default()))
36926            }
36927            FLIGHT_INFORMATION_DATA::ID => {
36928                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
36929            }
36930            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
36931            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
36932            GENERATOR_STATUS_DATA::ID => {
36933                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
36934            }
36935            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
36936                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
36937            )),
36938            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
36939                GIMBAL_DEVICE_INFORMATION_DATA::default(),
36940            )),
36941            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
36942                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
36943            )),
36944            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
36945                GIMBAL_MANAGER_INFORMATION_DATA::default(),
36946            )),
36947            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
36948                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
36949            )),
36950            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
36951                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
36952                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
36953                ))
36954            }
36955            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
36956                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
36957            )),
36958            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
36959                GIMBAL_MANAGER_STATUS_DATA::default(),
36960            )),
36961            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
36962                GLOBAL_POSITION_INT_DATA::default(),
36963            )),
36964            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
36965                GLOBAL_POSITION_INT_COV_DATA::default(),
36966            )),
36967            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
36968                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
36969                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
36970                ))
36971            }
36972            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
36973            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
36974            GPS_GLOBAL_ORIGIN_DATA::ID => {
36975                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
36976            }
36977            GPS_INJECT_DATA_DATA::ID => {
36978                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
36979            }
36980            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
36981            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
36982            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
36983            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
36984            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
36985            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
36986            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
36987            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
36988            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
36989            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
36990                HIL_ACTUATOR_CONTROLS_DATA::default(),
36991            )),
36992            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
36993            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
36994            HIL_OPTICAL_FLOW_DATA::ID => {
36995                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
36996            }
36997            HIL_RC_INPUTS_RAW_DATA::ID => {
36998                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
36999            }
37000            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
37001            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
37002            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37003                HIL_STATE_QUATERNION_DATA::default(),
37004            )),
37005            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
37006            HYGROMETER_SENSOR_DATA::ID => {
37007                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
37008            }
37009            ILLUMINATOR_STATUS_DATA::ID => {
37010                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
37011            }
37012            ISBD_LINK_STATUS_DATA::ID => {
37013                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
37014            }
37015            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
37016            LINK_NODE_STATUS_DATA::ID => {
37017                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
37018            }
37019            LOCAL_POSITION_NED_DATA::ID => {
37020                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
37021            }
37022            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37023                LOCAL_POSITION_NED_COV_DATA::default(),
37024            )),
37025            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37026                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37027                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
37028                ))
37029            }
37030            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
37031            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
37032            LOGGING_DATA_ACKED_DATA::ID => {
37033                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
37034            }
37035            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
37036            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
37037            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
37038            LOG_REQUEST_DATA_DATA::ID => {
37039                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
37040            }
37041            LOG_REQUEST_END_DATA::ID => {
37042                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
37043            }
37044            LOG_REQUEST_LIST_DATA::ID => {
37045                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
37046            }
37047            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
37048            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
37049            MANUAL_SETPOINT_DATA::ID => {
37050                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
37051            }
37052            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
37053            MESSAGE_INTERVAL_DATA::ID => {
37054                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
37055            }
37056            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
37057            MISSION_CLEAR_ALL_DATA::ID => {
37058                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
37059            }
37060            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
37061            MISSION_CURRENT_DATA::ID => {
37062                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
37063            }
37064            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
37065            MISSION_ITEM_INT_DATA::ID => {
37066                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
37067            }
37068            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37069                MISSION_ITEM_REACHED_DATA::default(),
37070            )),
37071            MISSION_REQUEST_DATA::ID => {
37072                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
37073            }
37074            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37075                MISSION_REQUEST_INT_DATA::default(),
37076            )),
37077            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37078                MISSION_REQUEST_LIST_DATA::default(),
37079            )),
37080            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37081                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
37082            )),
37083            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37084                MISSION_SET_CURRENT_DATA::default(),
37085            )),
37086            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37087                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
37088            )),
37089            MOUNT_ORIENTATION_DATA::ID => {
37090                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
37091            }
37092            NAMED_VALUE_FLOAT_DATA::ID => {
37093                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
37094            }
37095            NAMED_VALUE_INT_DATA::ID => {
37096                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
37097            }
37098            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37099                NAV_CONTROLLER_OUTPUT_DATA::default(),
37100            )),
37101            OBSTACLE_DISTANCE_DATA::ID => {
37102                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
37103            }
37104            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
37105            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37106                ONBOARD_COMPUTER_STATUS_DATA::default(),
37107            )),
37108            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37109                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
37110            )),
37111            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37112                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
37113            )),
37114            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37115                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
37116            )),
37117            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37118                OPEN_DRONE_ID_LOCATION_DATA::default(),
37119            )),
37120            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37121                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
37122            )),
37123            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37124                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
37125            )),
37126            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37127                OPEN_DRONE_ID_SELF_ID_DATA::default(),
37128            )),
37129            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37130                OPEN_DRONE_ID_SYSTEM_DATA::default(),
37131            )),
37132            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37133                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
37134            )),
37135            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
37136            OPTICAL_FLOW_RAD_DATA::ID => {
37137                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
37138            }
37139            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37140                ORBIT_EXECUTION_STATUS_DATA::default(),
37141            )),
37142            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
37143            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37144                PARAM_EXT_REQUEST_LIST_DATA::default(),
37145            )),
37146            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37147                PARAM_EXT_REQUEST_READ_DATA::default(),
37148            )),
37149            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
37150            PARAM_EXT_VALUE_DATA::ID => {
37151                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
37152            }
37153            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
37154            PARAM_REQUEST_LIST_DATA::ID => {
37155                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
37156            }
37157            PARAM_REQUEST_READ_DATA::ID => {
37158                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
37159            }
37160            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
37161            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
37162            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
37163            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
37164            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
37165            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37166                POSITION_TARGET_GLOBAL_INT_DATA::default(),
37167            )),
37168            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37169                POSITION_TARGET_LOCAL_NED_DATA::default(),
37170            )),
37171            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
37172            PROTOCOL_VERSION_DATA::ID => {
37173                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
37174            }
37175            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
37176            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
37177            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
37178            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
37179            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
37180            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37181                RC_CHANNELS_OVERRIDE_DATA::default(),
37182            )),
37183            RC_CHANNELS_RAW_DATA::ID => {
37184                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
37185            }
37186            RC_CHANNELS_SCALED_DATA::ID => {
37187                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
37188            }
37189            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37190                REQUEST_DATA_STREAM_DATA::default(),
37191            )),
37192            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
37193            RESOURCE_REQUEST_DATA::ID => {
37194                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
37195            }
37196            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37197                RESPONSE_EVENT_ERROR_DATA::default(),
37198            )),
37199            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37200                SAFETY_ALLOWED_AREA_DATA::default(),
37201            )),
37202            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37203                SAFETY_SET_ALLOWED_AREA_DATA::default(),
37204            )),
37205            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
37206            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
37207            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
37208            SCALED_PRESSURE_DATA::ID => {
37209                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
37210            }
37211            SCALED_PRESSURE2_DATA::ID => {
37212                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
37213            }
37214            SCALED_PRESSURE3_DATA::ID => {
37215                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
37216            }
37217            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
37218            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
37219                SERIAL_UDB_EXTRA_F13_DATA::default(),
37220            )),
37221            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
37222                SERIAL_UDB_EXTRA_F14_DATA::default(),
37223            )),
37224            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
37225                SERIAL_UDB_EXTRA_F15_DATA::default(),
37226            )),
37227            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
37228                SERIAL_UDB_EXTRA_F16_DATA::default(),
37229            )),
37230            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
37231                SERIAL_UDB_EXTRA_F17_DATA::default(),
37232            )),
37233            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
37234                SERIAL_UDB_EXTRA_F18_DATA::default(),
37235            )),
37236            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
37237                SERIAL_UDB_EXTRA_F19_DATA::default(),
37238            )),
37239            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
37240                SERIAL_UDB_EXTRA_F20_DATA::default(),
37241            )),
37242            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
37243                SERIAL_UDB_EXTRA_F21_DATA::default(),
37244            )),
37245            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
37246                SERIAL_UDB_EXTRA_F22_DATA::default(),
37247            )),
37248            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
37249                SERIAL_UDB_EXTRA_F2_A_DATA::default(),
37250            )),
37251            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
37252                SERIAL_UDB_EXTRA_F2_B_DATA::default(),
37253            )),
37254            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
37255                SERIAL_UDB_EXTRA_F4_DATA::default(),
37256            )),
37257            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
37258                SERIAL_UDB_EXTRA_F5_DATA::default(),
37259            )),
37260            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
37261                SERIAL_UDB_EXTRA_F6_DATA::default(),
37262            )),
37263            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
37264                SERIAL_UDB_EXTRA_F7_DATA::default(),
37265            )),
37266            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
37267                SERIAL_UDB_EXTRA_F8_DATA::default(),
37268            )),
37269            SERVO_OUTPUT_RAW_DATA::ID => {
37270                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
37271            }
37272            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
37273            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37274                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
37275            )),
37276            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37277                SET_ATTITUDE_TARGET_DATA::default(),
37278            )),
37279            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37280                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
37281            )),
37282            SET_HOME_POSITION_DATA::ID => {
37283                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
37284            }
37285            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
37286            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37287                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
37288            )),
37289            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37290                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
37291            )),
37292            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
37293            SMART_BATTERY_INFO_DATA::ID => {
37294                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
37295            }
37296            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
37297            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37298                STORAGE_INFORMATION_DATA::default(),
37299            )),
37300            SUPPORTED_TUNES_DATA::ID => {
37301                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
37302            }
37303            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
37304            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
37305            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
37306            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
37307            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
37308            TERRAIN_REQUEST_DATA::ID => {
37309                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
37310            }
37311            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
37312            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37313                TIME_ESTIMATE_TO_TARGET_DATA::default(),
37314            )),
37315            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37316                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37317                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
37318                ))
37319            }
37320            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37321                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37322                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
37323                ))
37324            }
37325            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
37326            UAVCAN_NODE_INFO_DATA::ID => {
37327                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
37328            }
37329            UAVCAN_NODE_STATUS_DATA::ID => {
37330                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
37331            }
37332            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37333                UTM_GLOBAL_POSITION_DATA::default(),
37334            )),
37335            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
37336            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
37337            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
37338            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37339                VICON_POSITION_ESTIMATE_DATA::default(),
37340            )),
37341            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37342                VIDEO_STREAM_INFORMATION_DATA::default(),
37343            )),
37344            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37345                VIDEO_STREAM_STATUS_DATA::default(),
37346            )),
37347            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37348                VISION_POSITION_ESTIMATE_DATA::default(),
37349            )),
37350            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37351                VISION_SPEED_ESTIMATE_DATA::default(),
37352            )),
37353            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
37354            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
37355            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
37356            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
37357            _ => None,
37358        }
37359    }
37360    #[cfg(feature = "arbitrary")]
37361    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
37362        match id {
37363            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
37364                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37365            )),
37366            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
37367                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
37368            )),
37369            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
37370            AIRSPEEDS_DATA::ID => Some(Self::AIRSPEEDS(AIRSPEEDS_DATA::random(rng))),
37371            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
37372            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
37373            ALTITUDES_DATA::ID => Some(Self::ALTITUDES(ALTITUDES_DATA::random(rng))),
37374            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
37375            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
37376                ATTITUDE_QUATERNION_DATA::random(rng),
37377            )),
37378            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
37379                ATTITUDE_QUATERNION_COV_DATA::random(rng),
37380            )),
37381            ATTITUDE_TARGET_DATA::ID => {
37382                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
37383            }
37384            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
37385            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
37386            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
37387                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
37388                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
37389                ))
37390            }
37391            AUTOPILOT_VERSION_DATA::ID => {
37392                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
37393            }
37394            AVAILABLE_MODES_DATA::ID => {
37395                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
37396            }
37397            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
37398                AVAILABLE_MODES_MONITOR_DATA::random(rng),
37399            )),
37400            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
37401            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
37402            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
37403            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
37404                CAMERA_CAPTURE_STATUS_DATA::random(rng),
37405            )),
37406            CAMERA_FOV_STATUS_DATA::ID => {
37407                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
37408            }
37409            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
37410                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
37411            )),
37412            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
37413                CAMERA_INFORMATION_DATA::random(rng),
37414            )),
37415            CAMERA_SETTINGS_DATA::ID => {
37416                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
37417            }
37418            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
37419                CAMERA_THERMAL_RANGE_DATA::random(rng),
37420            )),
37421            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
37422                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
37423            )),
37424            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
37425                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
37426            )),
37427            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
37428            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
37429            CAN_FILTER_MODIFY_DATA::ID => {
37430                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
37431            }
37432            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
37433            CELLULAR_CONFIG_DATA::ID => {
37434                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
37435            }
37436            CELLULAR_STATUS_DATA::ID => {
37437                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
37438            }
37439            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
37440                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
37441            )),
37442            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
37443                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
37444            )),
37445            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
37446            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
37447            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
37448            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
37449            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
37450            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
37451                COMPONENT_INFORMATION_DATA::random(rng),
37452            )),
37453            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
37454                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
37455            )),
37456            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
37457                COMPONENT_METADATA_DATA::random(rng),
37458            )),
37459            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
37460                CONTROL_SYSTEM_STATE_DATA::random(rng),
37461            )),
37462            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
37463                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
37464            )),
37465            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
37466            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
37467            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
37468                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
37469            )),
37470            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
37471            DEBUG_FLOAT_ARRAY_DATA::ID => {
37472                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
37473            }
37474            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
37475            DISTANCE_SENSOR_DATA::ID => {
37476                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
37477            }
37478            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
37479            ENCAPSULATED_DATA_DATA::ID => {
37480                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
37481            }
37482            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
37483            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
37484            ESTIMATOR_STATUS_DATA::ID => {
37485                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
37486            }
37487            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
37488            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
37489                EXTENDED_SYS_STATE_DATA::random(rng),
37490            )),
37491            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
37492            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
37493                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
37494            )),
37495            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION(
37496                FLEXIFUNCTION_BUFFER_FUNCTION_DATA::random(rng),
37497            )),
37498            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
37499                Some(Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(
37500                    FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::random(rng),
37501                ))
37502            }
37503            FLEXIFUNCTION_COMMAND_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND(
37504                FLEXIFUNCTION_COMMAND_DATA::random(rng),
37505            )),
37506            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_COMMAND_ACK(
37507                FLEXIFUNCTION_COMMAND_ACK_DATA::random(rng),
37508            )),
37509            FLEXIFUNCTION_DIRECTORY_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY(
37510                FLEXIFUNCTION_DIRECTORY_DATA::random(rng),
37511            )),
37512            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => Some(Self::FLEXIFUNCTION_DIRECTORY_ACK(
37513                FLEXIFUNCTION_DIRECTORY_ACK_DATA::random(rng),
37514            )),
37515            FLEXIFUNCTION_READ_REQ_DATA::ID => Some(Self::FLEXIFUNCTION_READ_REQ(
37516                FLEXIFUNCTION_READ_REQ_DATA::random(rng),
37517            )),
37518            FLEXIFUNCTION_SET_DATA::ID => {
37519                Some(Self::FLEXIFUNCTION_SET(FLEXIFUNCTION_SET_DATA::random(rng)))
37520            }
37521            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
37522                FLIGHT_INFORMATION_DATA::random(rng),
37523            )),
37524            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
37525            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
37526            GENERATOR_STATUS_DATA::ID => {
37527                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
37528            }
37529            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
37530                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
37531            )),
37532            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
37533                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
37534            )),
37535            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
37536                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
37537            )),
37538            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
37539                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
37540            )),
37541            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
37542                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
37543            )),
37544            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
37545                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
37546                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
37547                ))
37548            }
37549            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
37550                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
37551            )),
37552            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
37553                GIMBAL_MANAGER_STATUS_DATA::random(rng),
37554            )),
37555            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
37556                GLOBAL_POSITION_INT_DATA::random(rng),
37557            )),
37558            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
37559                GLOBAL_POSITION_INT_COV_DATA::random(rng),
37560            )),
37561            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
37562                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
37563                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
37564                ))
37565            }
37566            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
37567            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
37568            GPS_GLOBAL_ORIGIN_DATA::ID => {
37569                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
37570            }
37571            GPS_INJECT_DATA_DATA::ID => {
37572                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
37573            }
37574            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
37575            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
37576            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
37577            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
37578            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
37579            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
37580            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
37581            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
37582            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
37583            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
37584                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
37585            )),
37586            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
37587            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
37588            HIL_OPTICAL_FLOW_DATA::ID => {
37589                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
37590            }
37591            HIL_RC_INPUTS_RAW_DATA::ID => {
37592                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
37593            }
37594            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
37595            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
37596            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
37597                HIL_STATE_QUATERNION_DATA::random(rng),
37598            )),
37599            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
37600            HYGROMETER_SENSOR_DATA::ID => {
37601                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
37602            }
37603            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
37604                ILLUMINATOR_STATUS_DATA::random(rng),
37605            )),
37606            ISBD_LINK_STATUS_DATA::ID => {
37607                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
37608            }
37609            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
37610            LINK_NODE_STATUS_DATA::ID => {
37611                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
37612            }
37613            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
37614                LOCAL_POSITION_NED_DATA::random(rng),
37615            )),
37616            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
37617                LOCAL_POSITION_NED_COV_DATA::random(rng),
37618            )),
37619            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
37620                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
37621                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
37622                ))
37623            }
37624            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
37625            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
37626            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
37627                LOGGING_DATA_ACKED_DATA::random(rng),
37628            )),
37629            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
37630            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
37631            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
37632            LOG_REQUEST_DATA_DATA::ID => {
37633                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
37634            }
37635            LOG_REQUEST_END_DATA::ID => {
37636                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
37637            }
37638            LOG_REQUEST_LIST_DATA::ID => {
37639                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
37640            }
37641            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
37642            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
37643            MANUAL_SETPOINT_DATA::ID => {
37644                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
37645            }
37646            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
37647            MESSAGE_INTERVAL_DATA::ID => {
37648                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
37649            }
37650            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
37651            MISSION_CLEAR_ALL_DATA::ID => {
37652                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
37653            }
37654            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
37655            MISSION_CURRENT_DATA::ID => {
37656                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
37657            }
37658            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
37659            MISSION_ITEM_INT_DATA::ID => {
37660                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
37661            }
37662            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
37663                MISSION_ITEM_REACHED_DATA::random(rng),
37664            )),
37665            MISSION_REQUEST_DATA::ID => {
37666                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
37667            }
37668            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
37669                MISSION_REQUEST_INT_DATA::random(rng),
37670            )),
37671            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
37672                MISSION_REQUEST_LIST_DATA::random(rng),
37673            )),
37674            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
37675                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
37676            )),
37677            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
37678                MISSION_SET_CURRENT_DATA::random(rng),
37679            )),
37680            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
37681                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
37682            )),
37683            MOUNT_ORIENTATION_DATA::ID => {
37684                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
37685            }
37686            NAMED_VALUE_FLOAT_DATA::ID => {
37687                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
37688            }
37689            NAMED_VALUE_INT_DATA::ID => {
37690                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
37691            }
37692            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
37693                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
37694            )),
37695            OBSTACLE_DISTANCE_DATA::ID => {
37696                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
37697            }
37698            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
37699            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
37700                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
37701            )),
37702            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
37703                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
37704            )),
37705            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
37706                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
37707            )),
37708            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
37709                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
37710            )),
37711            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
37712                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
37713            )),
37714            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
37715                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
37716            )),
37717            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
37718                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
37719            )),
37720            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
37721                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
37722            )),
37723            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
37724                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
37725            )),
37726            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
37727                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
37728            )),
37729            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
37730            OPTICAL_FLOW_RAD_DATA::ID => {
37731                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
37732            }
37733            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
37734                ORBIT_EXECUTION_STATUS_DATA::random(rng),
37735            )),
37736            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
37737            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
37738                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
37739            )),
37740            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
37741                PARAM_EXT_REQUEST_READ_DATA::random(rng),
37742            )),
37743            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
37744            PARAM_EXT_VALUE_DATA::ID => {
37745                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
37746            }
37747            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
37748            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
37749                PARAM_REQUEST_LIST_DATA::random(rng),
37750            )),
37751            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
37752                PARAM_REQUEST_READ_DATA::random(rng),
37753            )),
37754            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
37755            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
37756            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
37757            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
37758            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
37759            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
37760                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37761            )),
37762            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
37763                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37764            )),
37765            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
37766            PROTOCOL_VERSION_DATA::ID => {
37767                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
37768            }
37769            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
37770            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
37771            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
37772            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
37773            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
37774            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
37775                RC_CHANNELS_OVERRIDE_DATA::random(rng),
37776            )),
37777            RC_CHANNELS_RAW_DATA::ID => {
37778                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
37779            }
37780            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
37781                RC_CHANNELS_SCALED_DATA::random(rng),
37782            )),
37783            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
37784                REQUEST_DATA_STREAM_DATA::random(rng),
37785            )),
37786            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
37787            RESOURCE_REQUEST_DATA::ID => {
37788                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
37789            }
37790            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
37791                RESPONSE_EVENT_ERROR_DATA::random(rng),
37792            )),
37793            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
37794                SAFETY_ALLOWED_AREA_DATA::random(rng),
37795            )),
37796            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
37797                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
37798            )),
37799            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
37800            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
37801            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
37802            SCALED_PRESSURE_DATA::ID => {
37803                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
37804            }
37805            SCALED_PRESSURE2_DATA::ID => {
37806                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
37807            }
37808            SCALED_PRESSURE3_DATA::ID => {
37809                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
37810            }
37811            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
37812            SERIAL_UDB_EXTRA_F13_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F13(
37813                SERIAL_UDB_EXTRA_F13_DATA::random(rng),
37814            )),
37815            SERIAL_UDB_EXTRA_F14_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F14(
37816                SERIAL_UDB_EXTRA_F14_DATA::random(rng),
37817            )),
37818            SERIAL_UDB_EXTRA_F15_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F15(
37819                SERIAL_UDB_EXTRA_F15_DATA::random(rng),
37820            )),
37821            SERIAL_UDB_EXTRA_F16_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F16(
37822                SERIAL_UDB_EXTRA_F16_DATA::random(rng),
37823            )),
37824            SERIAL_UDB_EXTRA_F17_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F17(
37825                SERIAL_UDB_EXTRA_F17_DATA::random(rng),
37826            )),
37827            SERIAL_UDB_EXTRA_F18_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F18(
37828                SERIAL_UDB_EXTRA_F18_DATA::random(rng),
37829            )),
37830            SERIAL_UDB_EXTRA_F19_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F19(
37831                SERIAL_UDB_EXTRA_F19_DATA::random(rng),
37832            )),
37833            SERIAL_UDB_EXTRA_F20_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F20(
37834                SERIAL_UDB_EXTRA_F20_DATA::random(rng),
37835            )),
37836            SERIAL_UDB_EXTRA_F21_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F21(
37837                SERIAL_UDB_EXTRA_F21_DATA::random(rng),
37838            )),
37839            SERIAL_UDB_EXTRA_F22_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F22(
37840                SERIAL_UDB_EXTRA_F22_DATA::random(rng),
37841            )),
37842            SERIAL_UDB_EXTRA_F2_A_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_A(
37843                SERIAL_UDB_EXTRA_F2_A_DATA::random(rng),
37844            )),
37845            SERIAL_UDB_EXTRA_F2_B_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F2_B(
37846                SERIAL_UDB_EXTRA_F2_B_DATA::random(rng),
37847            )),
37848            SERIAL_UDB_EXTRA_F4_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F4(
37849                SERIAL_UDB_EXTRA_F4_DATA::random(rng),
37850            )),
37851            SERIAL_UDB_EXTRA_F5_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F5(
37852                SERIAL_UDB_EXTRA_F5_DATA::random(rng),
37853            )),
37854            SERIAL_UDB_EXTRA_F6_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F6(
37855                SERIAL_UDB_EXTRA_F6_DATA::random(rng),
37856            )),
37857            SERIAL_UDB_EXTRA_F7_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F7(
37858                SERIAL_UDB_EXTRA_F7_DATA::random(rng),
37859            )),
37860            SERIAL_UDB_EXTRA_F8_DATA::ID => Some(Self::SERIAL_UDB_EXTRA_F8(
37861                SERIAL_UDB_EXTRA_F8_DATA::random(rng),
37862            )),
37863            SERVO_OUTPUT_RAW_DATA::ID => {
37864                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
37865            }
37866            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
37867            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
37868                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
37869            )),
37870            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
37871                SET_ATTITUDE_TARGET_DATA::random(rng),
37872            )),
37873            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
37874                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
37875            )),
37876            SET_HOME_POSITION_DATA::ID => {
37877                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
37878            }
37879            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
37880            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
37881                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
37882            )),
37883            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
37884                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
37885            )),
37886            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
37887            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
37888                SMART_BATTERY_INFO_DATA::random(rng),
37889            )),
37890            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
37891            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
37892                STORAGE_INFORMATION_DATA::random(rng),
37893            )),
37894            SUPPORTED_TUNES_DATA::ID => {
37895                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
37896            }
37897            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
37898            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
37899            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
37900            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
37901            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
37902            TERRAIN_REQUEST_DATA::ID => {
37903                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
37904            }
37905            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
37906            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
37907                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
37908            )),
37909            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
37910                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
37911                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
37912                ))
37913            }
37914            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
37915                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
37916                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
37917                ))
37918            }
37919            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
37920            UAVCAN_NODE_INFO_DATA::ID => {
37921                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
37922            }
37923            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
37924                UAVCAN_NODE_STATUS_DATA::random(rng),
37925            )),
37926            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
37927                UTM_GLOBAL_POSITION_DATA::random(rng),
37928            )),
37929            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
37930            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
37931            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
37932            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
37933                VICON_POSITION_ESTIMATE_DATA::random(rng),
37934            )),
37935            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
37936                VIDEO_STREAM_INFORMATION_DATA::random(rng),
37937            )),
37938            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
37939                VIDEO_STREAM_STATUS_DATA::random(rng),
37940            )),
37941            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
37942                VISION_POSITION_ESTIMATE_DATA::random(rng),
37943            )),
37944            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
37945                VISION_SPEED_ESTIMATE_DATA::random(rng),
37946            )),
37947            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
37948            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
37949            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
37950            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
37951            _ => None,
37952        }
37953    }
37954    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
37955        match self {
37956            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
37957            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
37958            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
37959            Self::AIRSPEEDS(body) => body.ser(version, bytes),
37960            Self::AIS_VESSEL(body) => body.ser(version, bytes),
37961            Self::ALTITUDE(body) => body.ser(version, bytes),
37962            Self::ALTITUDES(body) => body.ser(version, bytes),
37963            Self::ATTITUDE(body) => body.ser(version, bytes),
37964            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
37965            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
37966            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
37967            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
37968            Self::AUTH_KEY(body) => body.ser(version, bytes),
37969            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
37970            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
37971            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
37972            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
37973            Self::BATTERY_INFO(body) => body.ser(version, bytes),
37974            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
37975            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
37976            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
37977            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
37978            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
37979            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
37980            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
37981            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
37982            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
37983            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
37984            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
37985            Self::CANFD_FRAME(body) => body.ser(version, bytes),
37986            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
37987            Self::CAN_FRAME(body) => body.ser(version, bytes),
37988            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
37989            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
37990            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
37991            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
37992            Self::COLLISION(body) => body.ser(version, bytes),
37993            Self::COMMAND_ACK(body) => body.ser(version, bytes),
37994            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
37995            Self::COMMAND_INT(body) => body.ser(version, bytes),
37996            Self::COMMAND_LONG(body) => body.ser(version, bytes),
37997            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
37998            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
37999            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
38000            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
38001            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
38002            Self::CURRENT_MODE(body) => body.ser(version, bytes),
38003            Self::DATA_STREAM(body) => body.ser(version, bytes),
38004            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
38005            Self::DEBUG(body) => body.ser(version, bytes),
38006            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
38007            Self::DEBUG_VECT(body) => body.ser(version, bytes),
38008            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
38009            Self::EFI_STATUS(body) => body.ser(version, bytes),
38010            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
38011            Self::ESC_INFO(body) => body.ser(version, bytes),
38012            Self::ESC_STATUS(body) => body.ser(version, bytes),
38013            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
38014            Self::EVENT(body) => body.ser(version, bytes),
38015            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
38016            Self::FENCE_STATUS(body) => body.ser(version, bytes),
38017            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
38018            Self::FLEXIFUNCTION_BUFFER_FUNCTION(body) => body.ser(version, bytes),
38019            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(body) => body.ser(version, bytes),
38020            Self::FLEXIFUNCTION_COMMAND(body) => body.ser(version, bytes),
38021            Self::FLEXIFUNCTION_COMMAND_ACK(body) => body.ser(version, bytes),
38022            Self::FLEXIFUNCTION_DIRECTORY(body) => body.ser(version, bytes),
38023            Self::FLEXIFUNCTION_DIRECTORY_ACK(body) => body.ser(version, bytes),
38024            Self::FLEXIFUNCTION_READ_REQ(body) => body.ser(version, bytes),
38025            Self::FLEXIFUNCTION_SET(body) => body.ser(version, bytes),
38026            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
38027            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
38028            Self::FUEL_STATUS(body) => body.ser(version, bytes),
38029            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
38030            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
38031            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
38032            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
38033            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
38034            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
38035            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
38036            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
38037            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
38038            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
38039            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
38040            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38041            Self::GPS2_RAW(body) => body.ser(version, bytes),
38042            Self::GPS2_RTK(body) => body.ser(version, bytes),
38043            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38044            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
38045            Self::GPS_INPUT(body) => body.ser(version, bytes),
38046            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
38047            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
38048            Self::GPS_RTK(body) => body.ser(version, bytes),
38049            Self::GPS_STATUS(body) => body.ser(version, bytes),
38050            Self::HEARTBEAT(body) => body.ser(version, bytes),
38051            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
38052            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
38053            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
38054            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
38055            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
38056            Self::HIL_GPS(body) => body.ser(version, bytes),
38057            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
38058            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
38059            Self::HIL_SENSOR(body) => body.ser(version, bytes),
38060            Self::HIL_STATE(body) => body.ser(version, bytes),
38061            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
38062            Self::HOME_POSITION(body) => body.ser(version, bytes),
38063            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
38064            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
38065            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
38066            Self::LANDING_TARGET(body) => body.ser(version, bytes),
38067            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
38068            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
38069            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
38070            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
38071            Self::LOGGING_ACK(body) => body.ser(version, bytes),
38072            Self::LOGGING_DATA(body) => body.ser(version, bytes),
38073            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
38074            Self::LOG_DATA(body) => body.ser(version, bytes),
38075            Self::LOG_ENTRY(body) => body.ser(version, bytes),
38076            Self::LOG_ERASE(body) => body.ser(version, bytes),
38077            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
38078            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
38079            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
38080            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
38081            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
38082            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
38083            Self::MEMORY_VECT(body) => body.ser(version, bytes),
38084            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
38085            Self::MISSION_ACK(body) => body.ser(version, bytes),
38086            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
38087            Self::MISSION_COUNT(body) => body.ser(version, bytes),
38088            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
38089            Self::MISSION_ITEM(body) => body.ser(version, bytes),
38090            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
38091            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
38092            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
38093            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
38094            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
38095            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
38096            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
38097            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
38098            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
38099            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
38100            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
38101            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
38102            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
38103            Self::ODOMETRY(body) => body.ser(version, bytes),
38104            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
38105            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
38106            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
38107            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
38108            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
38109            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
38110            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
38111            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
38112            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
38113            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
38114            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
38115            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
38116            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
38117            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
38118            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
38119            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
38120            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
38121            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
38122            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
38123            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
38124            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
38125            Self::PARAM_SET(body) => body.ser(version, bytes),
38126            Self::PARAM_VALUE(body) => body.ser(version, bytes),
38127            Self::PING(body) => body.ser(version, bytes),
38128            Self::PLAY_TUNE(body) => body.ser(version, bytes),
38129            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
38130            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38131            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38132            Self::POWER_STATUS(body) => body.ser(version, bytes),
38133            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
38134            Self::RADIO_STATUS(body) => body.ser(version, bytes),
38135            Self::RAW_IMU(body) => body.ser(version, bytes),
38136            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
38137            Self::RAW_RPM(body) => body.ser(version, bytes),
38138            Self::RC_CHANNELS(body) => body.ser(version, bytes),
38139            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
38140            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
38141            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
38142            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
38143            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
38144            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
38145            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
38146            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
38147            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
38148            Self::SCALED_IMU(body) => body.ser(version, bytes),
38149            Self::SCALED_IMU2(body) => body.ser(version, bytes),
38150            Self::SCALED_IMU3(body) => body.ser(version, bytes),
38151            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
38152            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
38153            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
38154            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
38155            Self::SERIAL_UDB_EXTRA_F13(body) => body.ser(version, bytes),
38156            Self::SERIAL_UDB_EXTRA_F14(body) => body.ser(version, bytes),
38157            Self::SERIAL_UDB_EXTRA_F15(body) => body.ser(version, bytes),
38158            Self::SERIAL_UDB_EXTRA_F16(body) => body.ser(version, bytes),
38159            Self::SERIAL_UDB_EXTRA_F17(body) => body.ser(version, bytes),
38160            Self::SERIAL_UDB_EXTRA_F18(body) => body.ser(version, bytes),
38161            Self::SERIAL_UDB_EXTRA_F19(body) => body.ser(version, bytes),
38162            Self::SERIAL_UDB_EXTRA_F20(body) => body.ser(version, bytes),
38163            Self::SERIAL_UDB_EXTRA_F21(body) => body.ser(version, bytes),
38164            Self::SERIAL_UDB_EXTRA_F22(body) => body.ser(version, bytes),
38165            Self::SERIAL_UDB_EXTRA_F2_A(body) => body.ser(version, bytes),
38166            Self::SERIAL_UDB_EXTRA_F2_B(body) => body.ser(version, bytes),
38167            Self::SERIAL_UDB_EXTRA_F4(body) => body.ser(version, bytes),
38168            Self::SERIAL_UDB_EXTRA_F5(body) => body.ser(version, bytes),
38169            Self::SERIAL_UDB_EXTRA_F6(body) => body.ser(version, bytes),
38170            Self::SERIAL_UDB_EXTRA_F7(body) => body.ser(version, bytes),
38171            Self::SERIAL_UDB_EXTRA_F8(body) => body.ser(version, bytes),
38172            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
38173            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
38174            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
38175            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
38176            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
38177            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
38178            Self::SET_MODE(body) => body.ser(version, bytes),
38179            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
38180            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
38181            Self::SIM_STATE(body) => body.ser(version, bytes),
38182            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
38183            Self::STATUSTEXT(body) => body.ser(version, bytes),
38184            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
38185            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
38186            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
38187            Self::SYS_STATUS(body) => body.ser(version, bytes),
38188            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
38189            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
38190            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
38191            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
38192            Self::TIMESYNC(body) => body.ser(version, bytes),
38193            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
38194            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
38195            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
38196            Self::TUNNEL(body) => body.ser(version, bytes),
38197            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
38198            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
38199            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
38200            Self::V2_EXTENSION(body) => body.ser(version, bytes),
38201            Self::VFR_HUD(body) => body.ser(version, bytes),
38202            Self::VIBRATION(body) => body.ser(version, bytes),
38203            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38204            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
38205            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
38206            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
38207            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
38208            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
38209            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
38210            Self::WINCH_STATUS(body) => body.ser(version, bytes),
38211            Self::WIND_COV(body) => body.ser(version, bytes),
38212        }
38213    }
38214    fn extra_crc(id: u32) -> u8 {
38215        match id {
38216            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38217            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
38218            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
38219            AIRSPEEDS_DATA::ID => AIRSPEEDS_DATA::EXTRA_CRC,
38220            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
38221            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
38222            ALTITUDES_DATA::ID => ALTITUDES_DATA::EXTRA_CRC,
38223            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
38224            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
38225            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
38226            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
38227            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
38228            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
38229            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
38230                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
38231            }
38232            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
38233            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
38234            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
38235            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
38236            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
38237            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
38238            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
38239            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
38240            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
38241            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
38242            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
38243            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
38244            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
38245            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
38246            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
38247            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
38248            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
38249            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
38250            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
38251            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
38252            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
38253            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
38254            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
38255            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
38256            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
38257            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
38258            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
38259            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
38260            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
38261            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
38262            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
38263            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
38264            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
38265            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
38266            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
38267            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
38268            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
38269            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
38270            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
38271            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
38272            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
38273            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
38274            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
38275            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
38276            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
38277            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
38278            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
38279            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
38280            FLEXIFUNCTION_BUFFER_FUNCTION_DATA::ID => FLEXIFUNCTION_BUFFER_FUNCTION_DATA::EXTRA_CRC,
38281            FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::ID => {
38282                FLEXIFUNCTION_BUFFER_FUNCTION_ACK_DATA::EXTRA_CRC
38283            }
38284            FLEXIFUNCTION_COMMAND_DATA::ID => FLEXIFUNCTION_COMMAND_DATA::EXTRA_CRC,
38285            FLEXIFUNCTION_COMMAND_ACK_DATA::ID => FLEXIFUNCTION_COMMAND_ACK_DATA::EXTRA_CRC,
38286            FLEXIFUNCTION_DIRECTORY_DATA::ID => FLEXIFUNCTION_DIRECTORY_DATA::EXTRA_CRC,
38287            FLEXIFUNCTION_DIRECTORY_ACK_DATA::ID => FLEXIFUNCTION_DIRECTORY_ACK_DATA::EXTRA_CRC,
38288            FLEXIFUNCTION_READ_REQ_DATA::ID => FLEXIFUNCTION_READ_REQ_DATA::EXTRA_CRC,
38289            FLEXIFUNCTION_SET_DATA::ID => FLEXIFUNCTION_SET_DATA::EXTRA_CRC,
38290            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
38291            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
38292            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
38293            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
38294            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
38295            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
38296            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
38297            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
38298            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
38299            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
38300                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
38301            }
38302            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
38303            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
38304            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
38305            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
38306            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
38307                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
38308            }
38309            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
38310            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
38311            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38312            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
38313            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
38314            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
38315            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
38316            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
38317            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
38318            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
38319            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
38320            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
38321            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
38322            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
38323            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
38324            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
38325            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
38326            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
38327            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
38328            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
38329            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
38330            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
38331            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
38332            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
38333            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
38334            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
38335            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
38336            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
38337            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
38338            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
38339                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
38340            }
38341            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
38342            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
38343            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
38344            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
38345            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
38346            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
38347            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
38348            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
38349            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
38350            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
38351            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
38352            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
38353            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
38354            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
38355            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
38356            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
38357            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
38358            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
38359            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
38360            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
38361            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
38362            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
38363            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
38364            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
38365            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
38366            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
38367            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
38368            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
38369            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
38370            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
38371            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
38372            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
38373            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
38374            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
38375            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
38376            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
38377            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
38378            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
38379            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
38380            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
38381            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
38382            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
38383            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
38384            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
38385            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
38386            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
38387            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
38388            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
38389            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
38390            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
38391            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
38392            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
38393            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
38394            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
38395            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
38396            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
38397            PING_DATA::ID => PING_DATA::EXTRA_CRC,
38398            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
38399            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
38400            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
38401            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38402            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
38403            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
38404            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
38405            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
38406            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
38407            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
38408            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
38409            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
38410            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
38411            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
38412            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
38413            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
38414            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
38415            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
38416            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
38417            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
38418            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
38419            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
38420            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
38421            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
38422            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
38423            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
38424            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
38425            SERIAL_UDB_EXTRA_F13_DATA::ID => SERIAL_UDB_EXTRA_F13_DATA::EXTRA_CRC,
38426            SERIAL_UDB_EXTRA_F14_DATA::ID => SERIAL_UDB_EXTRA_F14_DATA::EXTRA_CRC,
38427            SERIAL_UDB_EXTRA_F15_DATA::ID => SERIAL_UDB_EXTRA_F15_DATA::EXTRA_CRC,
38428            SERIAL_UDB_EXTRA_F16_DATA::ID => SERIAL_UDB_EXTRA_F16_DATA::EXTRA_CRC,
38429            SERIAL_UDB_EXTRA_F17_DATA::ID => SERIAL_UDB_EXTRA_F17_DATA::EXTRA_CRC,
38430            SERIAL_UDB_EXTRA_F18_DATA::ID => SERIAL_UDB_EXTRA_F18_DATA::EXTRA_CRC,
38431            SERIAL_UDB_EXTRA_F19_DATA::ID => SERIAL_UDB_EXTRA_F19_DATA::EXTRA_CRC,
38432            SERIAL_UDB_EXTRA_F20_DATA::ID => SERIAL_UDB_EXTRA_F20_DATA::EXTRA_CRC,
38433            SERIAL_UDB_EXTRA_F21_DATA::ID => SERIAL_UDB_EXTRA_F21_DATA::EXTRA_CRC,
38434            SERIAL_UDB_EXTRA_F22_DATA::ID => SERIAL_UDB_EXTRA_F22_DATA::EXTRA_CRC,
38435            SERIAL_UDB_EXTRA_F2_A_DATA::ID => SERIAL_UDB_EXTRA_F2_A_DATA::EXTRA_CRC,
38436            SERIAL_UDB_EXTRA_F2_B_DATA::ID => SERIAL_UDB_EXTRA_F2_B_DATA::EXTRA_CRC,
38437            SERIAL_UDB_EXTRA_F4_DATA::ID => SERIAL_UDB_EXTRA_F4_DATA::EXTRA_CRC,
38438            SERIAL_UDB_EXTRA_F5_DATA::ID => SERIAL_UDB_EXTRA_F5_DATA::EXTRA_CRC,
38439            SERIAL_UDB_EXTRA_F6_DATA::ID => SERIAL_UDB_EXTRA_F6_DATA::EXTRA_CRC,
38440            SERIAL_UDB_EXTRA_F7_DATA::ID => SERIAL_UDB_EXTRA_F7_DATA::EXTRA_CRC,
38441            SERIAL_UDB_EXTRA_F8_DATA::ID => SERIAL_UDB_EXTRA_F8_DATA::EXTRA_CRC,
38442            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
38443            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
38444            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
38445            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
38446            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
38447            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
38448            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
38449            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
38450                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
38451            }
38452            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
38453            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
38454            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
38455            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
38456            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
38457            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
38458            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
38459            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
38460            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
38461            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
38462            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
38463            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
38464            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
38465            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
38466            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
38467                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
38468            }
38469            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
38470                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
38471            }
38472            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
38473            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
38474            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
38475            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
38476            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
38477            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
38478            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
38479            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38480            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
38481            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
38482            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
38483            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
38484            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
38485            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
38486            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
38487            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
38488            _ => 0,
38489        }
38490    }
38491    fn target_system_id(&self) -> Option<u8> {
38492        match self {
38493            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
38494            Self::CANFD_FRAME(inner) => Some(inner.target_system),
38495            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
38496            Self::CAN_FRAME(inner) => Some(inner.target_system),
38497            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
38498            Self::COMMAND_ACK(inner) => Some(inner.target_system),
38499            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
38500            Self::COMMAND_INT(inner) => Some(inner.target_system),
38501            Self::COMMAND_LONG(inner) => Some(inner.target_system),
38502            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
38503            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_system),
38504            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_system),
38505            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_system),
38506            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_system),
38507            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_system),
38508            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_system),
38509            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_system),
38510            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
38511            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
38512            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
38513            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
38514            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
38515            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
38516            Self::LOGGING_ACK(inner) => Some(inner.target_system),
38517            Self::LOGGING_DATA(inner) => Some(inner.target_system),
38518            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
38519            Self::LOG_ERASE(inner) => Some(inner.target_system),
38520            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
38521            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
38522            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
38523            Self::MISSION_ACK(inner) => Some(inner.target_system),
38524            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
38525            Self::MISSION_COUNT(inner) => Some(inner.target_system),
38526            Self::MISSION_ITEM(inner) => Some(inner.target_system),
38527            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
38528            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
38529            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
38530            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
38531            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
38532            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
38533            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
38534            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
38535            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
38536            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
38537            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
38538            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
38539            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
38540            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
38541            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
38542            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
38543            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
38544            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
38545            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
38546            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
38547            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
38548            Self::PARAM_SET(inner) => Some(inner.target_system),
38549            Self::PING(inner) => Some(inner.target_system),
38550            Self::PLAY_TUNE(inner) => Some(inner.target_system),
38551            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
38552            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
38553            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
38554            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
38555            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
38556            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
38557            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
38558            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
38559            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
38560            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
38561            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
38562            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
38563            Self::SET_MODE(inner) => Some(inner.target_system),
38564            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
38565            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
38566            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
38567            Self::TIMESYNC(inner) => Some(inner.target_system),
38568            Self::TUNNEL(inner) => Some(inner.target_system),
38569            Self::V2_EXTENSION(inner) => Some(inner.target_system),
38570            _ => None,
38571        }
38572    }
38573    fn target_component_id(&self) -> Option<u8> {
38574        match self {
38575            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
38576            Self::CANFD_FRAME(inner) => Some(inner.target_component),
38577            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
38578            Self::CAN_FRAME(inner) => Some(inner.target_component),
38579            Self::COMMAND_ACK(inner) => Some(inner.target_component),
38580            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
38581            Self::COMMAND_INT(inner) => Some(inner.target_component),
38582            Self::COMMAND_LONG(inner) => Some(inner.target_component),
38583            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
38584            Self::FLEXIFUNCTION_BUFFER_FUNCTION(inner) => Some(inner.target_component),
38585            Self::FLEXIFUNCTION_BUFFER_FUNCTION_ACK(inner) => Some(inner.target_component),
38586            Self::FLEXIFUNCTION_COMMAND(inner) => Some(inner.target_component),
38587            Self::FLEXIFUNCTION_DIRECTORY(inner) => Some(inner.target_component),
38588            Self::FLEXIFUNCTION_DIRECTORY_ACK(inner) => Some(inner.target_component),
38589            Self::FLEXIFUNCTION_READ_REQ(inner) => Some(inner.target_component),
38590            Self::FLEXIFUNCTION_SET(inner) => Some(inner.target_component),
38591            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
38592            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
38593            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
38594            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
38595            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
38596            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
38597            Self::LOGGING_ACK(inner) => Some(inner.target_component),
38598            Self::LOGGING_DATA(inner) => Some(inner.target_component),
38599            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
38600            Self::LOG_ERASE(inner) => Some(inner.target_component),
38601            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
38602            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
38603            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
38604            Self::MISSION_ACK(inner) => Some(inner.target_component),
38605            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
38606            Self::MISSION_COUNT(inner) => Some(inner.target_component),
38607            Self::MISSION_ITEM(inner) => Some(inner.target_component),
38608            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
38609            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
38610            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
38611            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
38612            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
38613            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
38614            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
38615            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
38616            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
38617            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
38618            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
38619            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
38620            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
38621            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
38622            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
38623            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
38624            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
38625            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
38626            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
38627            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
38628            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
38629            Self::PARAM_SET(inner) => Some(inner.target_component),
38630            Self::PING(inner) => Some(inner.target_component),
38631            Self::PLAY_TUNE(inner) => Some(inner.target_component),
38632            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
38633            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
38634            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
38635            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
38636            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
38637            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
38638            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
38639            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
38640            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
38641            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
38642            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
38643            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
38644            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
38645            Self::TIMESYNC(inner) => Some(inner.target_component),
38646            Self::TUNNEL(inner) => Some(inner.target_component),
38647            Self::V2_EXTENSION(inner) => Some(inner.target_component),
38648            _ => None,
38649        }
38650    }
38651}